On Tue, 27 Mar 2007, Manoj Joseph wrote:
[ ... ]
The problem I am trying to solve is that I want to export to userland some
information that is available in a kernel module - let's say my kernel
module.
The approaches that are being considered are 1) using the proc interface, 2)
using ioctls.
Looks like 1 is not possible and 2 is the way out. Is iocts the way to go or
is there a better mechanism you could suggest?
If it's for your own driver, then an ioctl() interface has the big big
advantage that you can keep the userland side of things identical on all
operating systems that you've ported your driver to. You're not getting
the same from using OS-specific interfaces (such as Linux procfs/sysfs or
Solaris kstats).
A prettyprinter for the ioctl interface is quickly written, e.g. in Perl
using POSIX::ioctl(). I don't see an advantage putting that prettyprinter
/ prettyparser into the kernel just to get a Linux procfs interface.
Linux procfs is doing the wrong thing in the wrong place ...
FrankH.
_______________________________________________
opensolaris-discuss mailing list
[email protected]