On Sun, Oct 13, 2013 at 09:50:59PM +0200, Bastien Nocera wrote:

> +        r = 
> read_one_line_file("/sys/bus/acpi/devices/INT3392:00/wakeup_events", &p);

/sys/bus/acpi/drivers/intel_rapid_start/*/wakeup_events would be better, 
if there's any way to use wildcards here. It's possible that later 
models will change the ACPI ID while still exposing the same userspace 
UI.

> +        /* We only support rapid start if we have both values set:
> +         * 1: Wake to enter hibernation when the wakeup timer expires
> +         * 2: Wake to enter hibernation when the battery reaches a
> +         * critical level */
> +        if (p[0] == '3' && p[1] == '\0')
> +                return true;

That seems a little harsh - not all firmware exposes the settings for 
this. I think it's legitimate to just program it yourself.

-- 
Matthew Garrett | mj...@srcf.ucam.org
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to