WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [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?).


EWWWWWWWWWWWWWW

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 ...

cheers,

  Gerd

--
Gerd 'just married' Hoffmann <kraxel@xxxxxxx>
I'm the hacker formerly known as Gerd Knorr.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>