Re: int/long confusion in serial ioctls

Michael Elizabeth Chastain (mec@shout.net)
Mon, 23 Aug 1999 02:37:08 -0500


Argh, a self-followup ... this is what I get for posting when I'm tired.

It just occurred to me that someone might say "we don't care if some
ioctls write an int and other ioctls write a long". So let me get
really specific. These counts are from kernel 2.3.14.

In 11 drivers, TIOCINQ writes an 'int' into user-space.
In 1 driver, TIOCINQ writes a 'long' into user-space.
(net/x25/af_x25.c).

In 12 drivers, TIOCOUTQ writes an 'int' into user-space.
In 1 driver, TIOCOUTQ writes a 'long' into user-space.
(net/x25/af_x25.c again).

In 20 drivers, TIOCMGET writes an 'int' into user-space.
In 6 drivers, TIOCMGET writes a 'long' into user-space.
(drivers/char/{cyclades.c,epca.c,isicom.c,serial167.c,specialix.c)
(drivers/sbus/char/aurora.c)

And so on. That's what I'm talking about: not differences between ioctls,
which would be really hard to change, but differences within a single
ioctl, which is likely to hurt 64-bit user-space programs unless they
are abnormally clever or kludgy.

Michael

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/