> > 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) ?
What version of pmud are you using, and from what source? The patch you sent has been included in the Debian package since 0.10-3 (bug #167836) a year ago ... and I believe I sent it to the apmud patch tracker as well. Sorry for not remembering immediately what this was about :-( Michael