linux - Where can I find the definition for a system call parameter? -
in ioctl man page defines:
int ioctl(int d,int request,...);
for example:
ioctl(fd,fionread,&nread);
where can find fionread information in linux? information defined? how many types there this?
in general, man page of system call (man 2 ioctl
— section 2 system calls) right place.
ioctl
special case because point of system call allow applications send commands devices don't fit in general mold. documentation of parameters not in documentation of ioctl
, in documentation of device drivers. man pages devices in section 4 (or section 7 on unix variants).
on linux, ioctl(2)
man page references ioctl_list(2)
contains summary of common ioctl types. there more documentation ioctls in device man pages such tty_ioctl(4)
(terminals — that's fionread
used for) , sd(4)
(disks scsi-like interface). more ioctl documented in kernel documentation, example cd drives. many drivers, linux lacks documentation , need refer kernel source code or headers (search under /usr/include
, hope you'll find comments).
Comments
Post a Comment