Hillel wrote: > Hi all > > I am building a kernel module (char device) that should get runtime > parameters from a user mode process. > Among the info items that should flow to the module are strings and > arrays. To my understanding I can use any of the following methods to > achieve this: ioctl, sysfs, procfs, device read and write and system calls. > > Is there a preferred method? maybe a different one?
Another method you didn't mention is netlink sockets, they are currently used to configure and get information on network devices, but are not limited just to network devices. I don't know to tell you about a preferred device overall, but if the data is for configuration purposes than procfs would be a common method for that. The user-mode gets a file to change and the kernel code has a function called or a variable that is set for it. I think that sysfs is a replacement of procfs for configuration but I haven't updated about it so am not certain. Adding a syscall is considered a bad way to do configuration, and ioctl are considered a bad way to do syscalls. device read and writes are better left for actual data transfer and not for configuration. Baruch ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]