[PATCH] Rely on the "Resuming" signal only on a system with systemd

Michael Biebl mbiebl at gmail.com
Sun May 12 10:08:31 PDT 2013


We already have a runtime check for systemd-logind. Why do we need a
compile-time check, too?
Am 12.05.2013 14:46 schrieb "Imran Haider" <imran1008 at gmail.com>:

> The notify-upower.sh script is only executed on a system with systemd. For
> distributions that use logind without a full fledged systemd, this script
> will not get executed and so upower would not know that it has resumed.
>
> This change fixes an issue where the system goes to sleep only once and
> does not sleep until upowerd is restarted.
> ---
>  src/linux/up-backend.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/linux/up-backend.c b/src/linux/up-backend.c
> index b9f75f5..e3c6c0a 100644
> --- a/src/linux/up-backend.c
> +++ b/src/linux/up-backend.c
> @@ -614,9 +614,11 @@ up_backend_get_hibernate_command (UpBackend *backend)
>  gboolean
>  up_backend_emits_resuming (UpBackend *backend)
>  {
> +#ifdef HAVE_SYSTEMD
>         if (LOGIND_AVAILABLE())
>                 return TRUE;
>         else
> +#endif
>                 return FALSE;
>  }
>  #endif
> --
> 1.8.2.2
>
> _______________________________________________
> devkit-devel mailing list
> devkit-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/devkit-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20130512/dcd1d037/attachment.html>


More information about the devkit-devel mailing list