int/long confusion in serial ioctls

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


Hello *,

I am revising my ioctl list (and finally getting to all the allocations that
people have asked me for, too).

I notice that some of the TIOC* serial ioctls have output types that are
different types in different device drivers. Specifically, the following
ioctls write an 'int' in most drivers, but write a 'long' in a few drivers:

TIOCINQ TIOCOUTQ
TIOCMGET TIOCMBIS TIOCMBIC TIOCMSET
TIOCGSOFTCAR TIOCSSOFTCAR
TIOCSERGWILD

Note that this is not a value in a registers, it's a value that the kernel
writes into memory, so it's important that it be the same size for all drivers
-- especially for big-endian architectures.

I would really like to make this consistent soon because more and more
64-bite architectures are coming at us, where this will make a difference.
Because most of the values are 'int', I'd like to standardize on 'int'
return values for most TIOC ioctls.

I plan to write up patches and send them to the appropriate maintainers.

Any feedback?

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/