linux kernel module char device
i'm writing a char device in linux - xubuntu , and i'm wondering if i have to implement ioctl OR maybe i can use the regular read write funcs??
thanks al开发者_如何学Gol, Amit
The primary interface for a character device is the file functions, with ioctl serving extra, optional functionality.
If you're new to kernel module programming, you might want to check out the Linux Kernel Module Programming Guide.
The standard read/write functions are part of standard fops(file operations) structure in a character device driver model.If someone needs an additional functionality (which is user defined) and which is application dependent so you can go with ioctl() call.
精彩评论