[lkml]   [2006]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] [PATCH] sysfs support for Xen attributes
Arjan van de Ven wrote:
>> privcmd returns a filehandle which is then used
>> for ioctls (misc char dev maybe?).
> what is wrong with open() ?????
> things that return fd's that aren't open() (or dup and socket) are just
> evil. Esp if it's in proc or sysfs.

Nothing is wrong with open, but probably the sentense above is a bit too
short. If you call fd = open("/proc/xen/privcmd", ...) you'll get a
filehandle returned for the thingy (as usual) and then you'll use that
filehandle to call ioctl(fd, ...), so it's the usual unix way ...



Gerd 'just married' Hoffmann <>
I'm the hacker formerly known as Gerd Knorr.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-01-12 15:44    [W:0.082 / U:12.648 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site