lkml.org 
[lkml]   [2010]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/9] PM: suspend_block: Add driver to access suspend blockers from user-space
On Fri, Apr 23, 2010 at 10:43:49AM +0200, Pavel Machek wrote:
> > +To create a suspend_blocker from user-space, open the suspend_blocker device:
> > + fd = open("/dev/suspend_blocker", O_RDWR | O_CLOEXEC);
> > +then call:
> > + ioctl(fd, SUSPEND_BLOCKER_IOCTL_INIT(strlen(name)), name);
>
>
> This seems like very wrong idea -- it uses different ioctl number for
> each length AFAICT.

Yep, and there's nothing wrong with that IMHO. It's a clever use of
the _IOC encoding scheme.

- Ted


\
 
 \ /
  Last update: 2010-04-24 04:29    [W:1.019 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site