chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: make the fsck pass no configurable
[elogind.git]
/
src
/
login
/
logind-inhibit.c
diff --git
a/src/login/logind-inhibit.c
b/src/login/logind-inhibit.c
index b5b801e5e09a84bcbaa8d9cb43391c66e0304366..512fc0716bb4f1ad9ad3b6833ec7907f8a016331 100644
(file)
--- a/
src/login/logind-inhibit.c
+++ b/
src/login/logind-inhibit.c
@@
-163,7
+163,7
@@
int inhibitor_start(Inhibitor *i) {
i->started = true;
i->started = true;
- manager_send_changed(i->manager,
"
Inhibited\0");
+ manager_send_changed(i->manager,
i->mode == INHIBIT_BLOCK ? "BlockInhibited\0" : "Delay
Inhibited\0");
return 0;
}
return 0;
}
@@
-182,7
+182,7
@@
int inhibitor_stop(Inhibitor *i) {
i->started = false;
i->started = false;
- manager_send_changed(i->manager,
"
Inhibited\0");
+ manager_send_changed(i->manager,
i->mode == INHIBIT_BLOCK ? "BlockInhibited\0" : "Delay
Inhibited\0");
return 0;
}
return 0;
}
@@
-376,12
+376,12
@@
const char *inhibit_what_to_string(InhibitWhat w) {
static const char* const table[_INHIBIT_WHAT_MAX] = {
[0] = "",
[INHIBIT_SHUTDOWN] = "shutdown",
static const char* const table[_INHIBIT_WHAT_MAX] = {
[0] = "",
[INHIBIT_SHUTDOWN] = "shutdown",
- [INHIBIT_S
USPEND] = "suspend
",
+ [INHIBIT_S
LEEP] = "sleep
",
[INHIBIT_IDLE] = "idle",
[INHIBIT_IDLE] = "idle",
- [INHIBIT_SHUTDOWN|INHIBIT_S
USPEND] = "shutdown:suspend
",
+ [INHIBIT_SHUTDOWN|INHIBIT_S
LEEP] = "shutdown:sleep
",
[INHIBIT_SHUTDOWN|INHIBIT_IDLE] = "shutdown:idle",
[INHIBIT_SHUTDOWN|INHIBIT_IDLE] = "shutdown:idle",
- [INHIBIT_SHUTDOWN|INHIBIT_S
USPEND|INHIBIT_IDLE] = "shutdown:suspend
:idle",
- [INHIBIT_S
USPEND|INHIBIT_IDLE] = "suspend
:idle"
+ [INHIBIT_SHUTDOWN|INHIBIT_S
LEEP|INHIBIT_IDLE] = "shutdown:sleep
:idle",
+ [INHIBIT_S
LEEP|INHIBIT_IDLE] = "sleep
:idle"
};
if (w < 0 || w >= _INHIBIT_WHAT_MAX)
};
if (w < 0 || w >= _INHIBIT_WHAT_MAX)
@@
-398,8
+398,8
@@
InhibitWhat inhibit_what_from_string(const char *s) {
FOREACH_WORD_SEPARATOR(w, l, s, ":", state) {
if (l == 8 && strncmp(w, "shutdown", l) == 0)
what |= INHIBIT_SHUTDOWN;
FOREACH_WORD_SEPARATOR(w, l, s, ":", state) {
if (l == 8 && strncmp(w, "shutdown", l) == 0)
what |= INHIBIT_SHUTDOWN;
- else if (l ==
7 && strncmp(w, "suspend
", l) == 0)
- what |= INHIBIT_S
USPEND
;
+ else if (l ==
5 && strncmp(w, "sleep
", l) == 0)
+ what |= INHIBIT_S
LEEP
;
else if (l == 4 && strncmp(w, "idle", l) == 0)
what |= INHIBIT_IDLE;
else
else if (l == 4 && strncmp(w, "idle", l) == 0)
what |= INHIBIT_IDLE;
else