logind: properly parse handle-lid-switch inhibitor

This commit is contained in:
Lennart Poettering
2012-09-19 15:29:24 +02:00
parent 12a1309e11
commit f981b9c5be
+1 -1
View File
@@ -442,7 +442,7 @@ InhibitWhat inhibit_what_from_string(const char *s) {
what |= INHIBIT_HANDLE_POWER_KEY;
else if (l == 16 && strncmp(w, "handle-sleep-key", l) == 0)
what |= INHIBIT_HANDLE_SLEEP_KEY;
else if (l == 16 && strncmp(w, "handle-lid-switch", l) == 0)
else if (l == 17 && strncmp(w, "handle-lid-switch", l) == 0)
what |= INHIBIT_HANDLE_LID_SWITCH;
else
return _INHIBIT_WHAT_INVALID;