diff options
author | Alberto Villa <avilla@FreeBSD.org> | 2017-07-18 09:49:06 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-09-08 15:38:25 +0200 |
commit | 71ba27a7eab24a21283ac70ab7510ce26b63edc7 (patch) | |
tree | 1ab8ed8c009d790657ac1f9d32eb99cea03060cd /src | |
parent | 4753a8bc5a3b2790202fc5adba0f21de65c8a1ed (diff) |
freebsd: Fix lid detection on FreeBSD
UPower sets property LidIsPresent to true only if hw.acpi.lid_switch_state
is different from "NONE", "NONE" being the default value for FreeBSD.
Thus, the property is always false on default configurations.
Force UPower not to care about the value of the sysctl, making it check
only for its existence.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175531
https://bugs.freedesktop.org/show_bug.cgi?id=101828
Diffstat (limited to 'src')
-rw-r--r-- | src/freebsd/up-backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/freebsd/up-backend.c b/src/freebsd/up-backend.c index 16f32ce..2944e03 100644 --- a/src/freebsd/up-backend.c +++ b/src/freebsd/up-backend.c @@ -226,7 +226,7 @@ up_backend_lid_coldplug (UpBackend *backend) gchar *lid_state; lid_state = up_get_string_sysctl (NULL, "hw.acpi.lid_switch_state"); - if (lid_state && strcmp (lid_state, "NONE")) { + if (lid_state) { up_daemon_set_lid_is_present (backend->priv->daemon, TRUE); } g_free (lid_state); |