drivers/tty/tty_io.c
これは、次の実装を持つ実装されています。
/**
* tty_tiocmget - get modem status
* @tty: tty device
* @file: user file pointer
* @p: pointer to result
*
* Obtain the modem status bits from the tty driver if the feature
* is supported. Return -EINVAL if it is not available.
*
* Locking: none (up to the driver)
*/
static int tty_tiocmget(struct tty_struct *tty, int __user *p)
{
int retval = -EINVAL;
if (tty->ops->tiocmget) {
retval = tty->ops->tiocmget(tty);
if (retval >= 0)
retval = put_user(retval, p);
}
return retval;
}
コメントとコードからわかるように、基になるターミナル ドライバーがサポートしている場合にのみ機能し、それ以外の場合は を返しEINVAL
ます。
やさまざまな GSM モデム ドライバなど、これをサポートする多くのドライバがありますがisdn4linux
、通常の端末はモデムではないため対応しません。