linux - Where is TIOCMGET supposed to be implemented? -
this satisfy curiosity after this question. although i'm using alternative solution, original problem appears come downwards fact tiocmget not implemented, , i'd know bit why is.
sadly, haven't found much useful info googling, , i'm finding tty_ioctl man page (the first result) pretty impenetrable.
so, tocmget, implemented, , might mono looking , failing find it?
it's implemented in drivers/tty/tty_io.c
has next implementation:
/** * tty_tiocmget - modem status * @tty: tty device * @file: user file pointer * @p: pointer result * * obtain modem status bits tty driver if feature * supported. homecoming -einval if not available. * * locking: none (up 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); } homecoming retval; }
as note comment, , code, works if underlying terminal driver supports , otherwise homecoming einval
.
there number of drivers back upwards it, such isdn4linux
, various gsm modem drivers, ordinary terminals won't not modems.
linux mono ioctl
No comments:
Post a Comment