lkml.org 
[lkml]   [2005]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: best way to access device driver functions
From
Date
On 15 Sep 2005, Fawad Lateef stated:
> On 9/15/05, Ivan Korzakow <ivan.korzakow@gmail.com> wrote:
>> Could you explain me why ioctl should be avoided ? Is it going to be
>> deprecated in future kernel ?
>
> No ioctl are not deprecated, but they are just avoided b/c its not
> good to mess kernel with new system-calls as there is a different way
> for that !!!!

Well, not really; ioctl() is only one system call. They're actually
avoided because ioctl() has a horrible non-typesafe non-transparent
interface. (Quick! What parameters does the CCISS_PASSTHRU32 ioctl()
expect?)

sysfs fixes all of these problems, and adds easy scriptability
and interrogation from the command-line and a nice hierarchy
as well.


New *system calls* are generally avoided (especially if they might be
useful to non-privileged code) because they come with a *very* high
backward compatibility burden: it's pretty much the case that syscalls
that normal programs rely on should never go away. (Syscalls used only
by programs that you expect to change with the kernel, like modutils/
module-init-tools, are a special case.)

--
`One cannot, after all, be expected to read every single word
of a book whose author one wishes to insult.' --- Richard Dawkins
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-16 15:01    [W:1.602 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site