diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-20 23:17:37 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-07-21 15:59:02 +0200 |
commit | 81b72a962f0b6ebbe8e7dfcad306d33bf086529a (patch) | |
tree | eefab61af167df5cae79c017e4935ff707b06e3c /src/user-sessions | |
parent | 6f566391a428789d0bb54654642d4dc3d6948c68 (diff) |
user-sessions: fix write_string_file() fallout
WRITE_STRING_FILE_ATOMIC is only valid if WRITE_STRING_FILE_CREATE is also
given. IOW, an atomic file write operation is only possible when creating a
file is also being asked for.
This is a regression from the recent write_string_file() rework.
Diffstat (limited to 'src/user-sessions')
-rw-r--r-- | src/user-sessions/user-sessions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/user-sessions/user-sessions.c b/src/user-sessions/user-sessions.c index ddeb310c3c..e80a7771de 100644 --- a/src/user-sessions/user-sessions.c +++ b/src/user-sessions/user-sessions.c @@ -65,7 +65,7 @@ int main(int argc, char*argv[]) { } else if (streq(argv[1], "stop")) { int r; - r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_ATOMIC); + r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC); if (r < 0) { log_error_errno(r, "Failed to create /run/nologin: %m"); return EXIT_FAILURE; |