Subject: TIOCMGET not working (using mgetty)
To: None <port-sun3@NetBSD.ORG>
From: Jari Kokko <jkokko@cc.hut.fi>
List: port-sun3
Date: 09/23/1996 10:54:53
Hi all,

I installed the latest mgetty on my sun3, and bumped into something
strange: the TIOCMGET call on port ttyb returns 'inappropriate ioctl
for device'

As I understand it, that ioctl is defined only for serial devices, so
why isn't it working? Is it broken, or not implemented. (As an aside,
I also get 'modem signals not available' from kermit)

This logs a 'TIOCMGET failed' message:

int tio_get_rs232_lines _P1( (fd), int fd)
{
    int flags;
#ifdef TIO_F_SYSTEM_DEFS
    if ( ioctl(fd, TIOCMGET, &flags ) < 0 )
    	lprintf( L_ERROR, "tio_get_rs232_lines: TIOCMGET failed" );

#else /* !TIO_F_SYSTEM_DEFS */
    flags=-1;
#endif

    if ( flags != -1 )
    {
        lprintf( L_NOISE, "tio_get_rs232_lines: status:" );
        if ( flags & TIO_F_RTS ) lputs( L_NOISE, " RTS" );
        if ( flags & TIO_F_CTS ) lputs( L_NOISE, " CTS" );
        if ( flags & TIO_F_DSR ) lputs( L_NOISE, " DSR" );
        if ( flags & TIO_F_DTR ) lputs( L_NOISE, " DTR" );
        if ( flags & TIO_F_DCD ) lputs( L_NOISE, " DCD" );
        if ( flags & TIO_F_RI  ) lputs( L_NOISE, " RI" );
    }
    return flags;
}

Jari Kokko