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

Re: Keyboard backlight support in the near future?



> > Sure, that's understood. You have to be careful to not let it go to sleep
> > (hacking an -EBUSY return code in the sleep ioctl code for your kernel,
> > for instance).
>
> Well I tried that (works correctly: nothing happens on `snooze -f` except
> a "Devices rejected sleep" log from the kernel).

As it should.

> > With CAN_SLEEP added, does pmud start OK now?? (you could still use it for
> > pwrctl-based power management, and just shut down on battery low).
>
> Nope, still the same error.
> Strace relevant bit:
> fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR)
> fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK|O_EXCL|O_SYNC|O_ASYNC|O_DIRECT|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW|0x7ffc002c) = -1 EINVAL (Invalid argument)
>
> Which made me read the code and fcntl's manpage, in which I found your calls were looking strange... (It says, amongst other things:
>
>        int fcntl(int fd, int cmd);
>        int fcntl(int fd, int cmd, long arg);
>
> F_GETFL Read the file descriptor's flags.
> F_SETFL Set the file status flags part of the descriptor's flags to  the
>         value  specified by arg.
>
> RETURN VALUE
>        F_GETFL  Value of flags.
>
> The attached patch makes pmud function again for me (tested with -d and with Batmon).
> Could this be due to some changes in fcntl's lib (glibc i guess) ?

Could well be. The latest version of pmud was compiled against testing a
few days ago, which should not make much of a difference.
I'll try your patch in the next version.

	Michael



Reply to: