On Fri, 4 Mar 2005, michael young wrote: > Hi, > how do you use the ioctl.h? > there seems to be little info on it > on the web or in print. If you know > of anything on the web please let me > know. > > thank you, > Mike
Friday, March 04 ioctl is used for specific hardware control, it's use differs with each purpose. Could be rewinding tapes, opening your cd-rom player or set your serialport prefs.. Bit more info on what you want to accomplish ? That said.. Each GNU/Linux system should have a ioctl_list somewhere in the manual page section. For example: ~: man -k ioctl ioctl_list (2) - list of ioctl calls in Linux/i386 kernel console ioctl (4) [console_ioctl] - ioctl's for console terminal and virtual consoles console ioctl's (4) [console_ioctls] - ioctl's for console terminal and virtual consoles console_ioctl (4) - ioctl's for console terminal and virtual consoles .... etc.. ~: man 2 ioctl_list .......... BIG LIST ....... There should be enough IOCTL code on the www. search C and hardware control should return the most code I guess... if((fd = open(dev, O_RDONLY|O_NONBLOCK)) == -1) return -1; if(ioctl(fd, CDROMEJECT) == -1) return -1; close(fd); etc...... GoodLuck.. J. -- http://www.rdrs.net/ - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
