lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 13 Aug 2008 08:16:02 +0100
From"Marcin Obara" <>
SubjectRe: [PATCH] Intel Management Engine Interface
2008/8/13 Greg KH <greg@kroah.com>:
> On Mon, Aug 11, 2008 at 09:23:01PM +0200, Marcin Obara wrote:
>> +/* IOCTL commands */
>> +#define IOCTL_HECI_GET_VERSION \
>> +    _IOWR('H' , 0x0, struct heci_message_data)
>
> This can easily be a sysfs file, why not do that instead?
>
sysfs file would require additional file handle used by every userspace client.
GET_VERSION is called frequently, and sysfs file would create extra overhead.
With ioctl - only one file handle is used, and userspace client logic
is simpler.
Normal flow looks like:

open
ioctl(GET_VERSION)
ioctl(CONNECT)
... - do some operations - depends on version
close

or:

open
ioctl(CONNECT)
.. - do some operations
close


-- 
Marcin


\
 
 \ /
  Last update: 2008-08-13 09:21    [from the cache]
©2003-2008