So I have been reading into Linux APIs (syscalls and libc) as well as device ioctls., calling ioctls via create(dev_name)
and ioctl(device_file_handle)
and the sysfs
file system. So here are my questions:
Is sysfs 'supposed' to be a read only where various Kernel parameters are exposed to be read ? Or are they 'supposed' to be writable too ?
Are all drivers in future required to expose interfaces in
sysfs
?If the answer to the above is true, then would we be really requiring IOCTL calls at all anymore? because all that we would need to do to make a driver do something is to change values in some of the files in sysfs, e.g., To call a ioctl called DO_SOMETHING on driver D1, we would be doing :
echo 1> /sysfs/D1/IOCTLS/DO_SOMETHING ( or something like that ... :) )
Are there any plans of exposing the kernel API (that is syscalls and libc ) as sysfs files, e.g.,
echo 1> /sysfs/libc/get_system_time cat /sysfs/libc/results/system_time
Would it be a good idea to do this ?
Is there any sysfs like system in Windows ? Or any ongoing projects maybe?
How about exposing core system calls , libc and any new libraries over http ? ( Just wanted a frank discussion on this idea)