Re: Permission for 'dev/pmu'
On Sun, Jan 09, 2005 at 08:29:42PM +0100, Christoph Hellwig wrote:
> On Sun, Jan 09, 2005 at 08:38:09PM +0100, Sven Luther wrote:
> > Now, the problem still remains that the acme thingy needs to set the
> > PMU_IOC_GRAB_BACKLIGHT ioctl on the /dev/pmu device, and thus evidently need
> > write access. The easy solution to this problem is to set it to a group, which
> > the console-users get added to when loggin in. Does anyone know of such a group ?
>
> Maybe the real question is what is acme and why does it think it needs
> /dev/pmu? After all the system has worked just fine without that for
> years..
self = ACME_FBLEVEL (g_object_new (ACME_TYPE_FBLEVEL, NULL));
/* This function switches the kernel backlight control off.
* This is part of the PPC kernel branch since version
* 2.4.18-rc2-benh. It does nothing with older kernels.
* For those kernels a separate kernel patch is nessecary to
* get backlight control in user space.
*
* Notice nicked from pbbuttons*/
fd = open ("/dev/pmu", O_RDWR);
/* We can't emit the signal yet, the signal isn't connected! */
if (fd < 0) {
*error = g_error_new_literal (ACME_FBLEVEL_ERROR,
ACME_FBLEVEL_ERROR_WRONG_PERMS,
_("Wrong permission for
'/dev/pmu' device"));
return NULL;
}
foo = ioctl(fd, PMU_IOC_GRAB_BACKLIGHT, 0);
self->_priv->pmu_fd = fd;
return self;
Hope this replies to your doubts ?
Friendly,
Sven Luther
Reply to: