tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ioctl(2) vs sys/ioctl.h

>>      int     ioctl(int, unsigned long, ...);

> Most of our ioctl's take pointer arguments.  Some streams ioctls
> though take int arguments (ioctl(fd, I_FLUSH, FLUSHR) for example)
> and using void * as the argument would not compile cleanly.

Must FLUSHR (to continue your example) be defined as an int value?

Obviously there can be ABI issues, but they can be worked around the
same way you work around other compat ABI issues - or ignored, on
arches where ints and void *s are passed sufficiently compatibly.

Or perhaps ioctl could turn into something else after #including the
file that defines I_FLUSH and/or FLUSHR?

I'm just brainstorming possible ways to avoid inflicting a varargs
declaration on all users of ioctl.  I don't know whether there are any
issues which might break the above ideas - assuming anyone besides me
cares, that is.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index