[PATCH] Allow up_backend_supports_sleep_state (linux backend) to return FALSE if pm-is-supported exits with non-zero exit code.
Martin Pitt
martin.pitt at ubuntu.com
Thu Sep 22 08:37:06 PDT 2011
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_state in src/linux/up-backend.c: The 'ret'
> variable is re-used for the return code without being re-initialized to
> false after the call to g_spawn_command_line_sync.
Nice catch, thanks! I committed a slightly shorter version:
http://cgit.freedesktop.org/upower/commit/?id=ff23a9c6e229cd8a2c4226fdc281ab5853d6da35
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20110922/5692f178/attachment.pgp>
More information about the devkit-devel
mailing list