[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ioctl() vs ??
Fawad Lateef <fawadlateef@xxxxxxxxx> writes:
> On 02 Sep 2005 16:18:50 -0600, jbi130@xxxxxxxxx <jbi130@xxxxxxxxx> wrote:
> > I find myself implementing lots of ioctl() to get a set variables. Is
> > there a better/more correct alternative for this instead of polluting
> > the ioctl()? procfs maybe?
> >
>
> For which Kernel version you are talking about ?? If that is 2.4.x
> series kernel then you can use ProcFS, and in 2.6.x series you can use
> SysFS ..... in 2.6.x usage of ProcFS is said to be used for things
> related to process only; so go for SysFS in 2.6.x kernels.
2.6.. So is sysfs an ideal solution to get a set various variables? I
recall reading somewhere that ioctl()'s were an overused archaic
interface into the kernel. I do have cases where ioctl() appear to be
the right solution, but wonder about some of my other cases (exposing
a single variable).
Thanks.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/