tech-kern archive

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

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



In article <Pine.NEB.4.64.1012181604050.27150%quicky.whooppee.com@localhost>,
Paul Goyette  <paul%whooppee.com@localhost> wrote:
>Is there some reason why there is a discrepancy in the definition of 
>ioctl()?
>
>From man page ioctl(2)
>
>       SYNOPSIS
>            #include <sys/ioctl.h>
>
>            int
>            ioctl(int d, unsigned long request, void *argp);
>
>
>Yet, from sys/ioctl.h we have
>
>       __BEGIN_DECLS
>       int     ioctl(int, unsigned long, ...);
>       __END_DECLS
>

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. I think that we
should not have void * in the man page either.

christos



Home | Main Index | Thread Index | Old Index