Re: [RFC] [PATCH] sysfs support for Xen attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux