Re: [PATCH] Allow up_backend_supports_sleep_state (linux backend) to return FALSE if pm-is-supported exits with non-zero exit code.

2011-09-22 Thread Martin Pitt
Hello Christian, Christian Seiler [2011-09-22 16:29 +0200]: > I've recently stumbled upon to a problem with upowerd. Under linux, > regardless of the exit code of /usr/bin/pm-is-supported, it will always > set CanSuspend and CanHibernate to true due to a logic error in > up_backend_supports_sleep_

[PATCH] Allow up_backend_supports_sleep_state (linux backend) to return FALSE if pm-is-supported exits with non-zero exit code.

2011-09-22 Thread Christian Seiler
Hi, I've recently stumbled upon to a problem with upowerd. Under linux, regardless of the exit code of /usr/bin/pm-is-supported, it will always set CanSuspend and CanHibernate to true due to a logic error in up_backend_supports_sleep_state in src/linux/up-backend.c: The 'ret' variable is re-used f