[PATCH 1/2] Use pm-is-supported to test if various sleep modes are supported.

Ozan Çağlayan ozan at pardus.org.tr
Mon Jun 14 01:13:40 PDT 2010


Pazartesi 14 Haziran 2010 günü (saat 05:07:31) Victor Lowther şunları 
yazmıştı:
> pm-is-supported does all the work upower was duplicating, and it handles
> more use cases than the old upower code did.  No point in duplicating
> functionality.

> +
> +	/* run script from pm-utils */
> +	command = g_strdup_printf ("/usr/bin/pm-is-supported --%s", state);
> +	egg_debug ("excuting command: %s", command);
> +	ret = g_spawn_command_line_sync (command, NULL, NULL, &exit_status,

g_spawn_command_line_sync already searches for the command in $PATH so I think 
it's always better to directly call pm-is-supported for avoiding any problem 
caused by distributions installing pm-is-supported or other binaries to 
somewhere else.

Regards,


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng


More information about the devkit-devel mailing list