forked from pool/systemd
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=575
This commit is contained in:
parent
3556bf6f5f
commit
0a942ee324
@ -37,13 +37,13 @@ forward suspend/hibernation calls to pm-utils, if installed (bnc#790157)
|
||||
return r;
|
||||
}
|
||||
@@ -90,6 +90,8 @@ static int execute(char **modes, char **
|
||||
FILE *f;
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
const char* note = strappenda("SLEEP=", arg_verb);
|
||||
|
||||
+ if (!delegate_to_pmutils) {
|
||||
+
|
||||
/* This file is opened first, so that if we hit an error,
|
||||
* we can abort before modyfing any state. */
|
||||
* we can abort before modifying any state. */
|
||||
f = fopen("/sys/power/state", "we");
|
||||
@@ -102,6 +104,7 @@ static int execute(char **modes, char **
|
||||
r = write_mode(modes);
|
||||
@ -59,7 +59,7 @@ forward suspend/hibernation calls to pm-utils, if installed (bnc#790157)
|
||||
NULL);
|
||||
-
|
||||
+ if (!delegate_to_pmutils)
|
||||
r = write_state(f, states);
|
||||
r = write_state(&f, states);
|
||||
+ else
|
||||
+ r = -system(pmtools);
|
||||
if (r < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user