diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-06 19:19:25 -0400 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-07-06 19:19:25 -0400 |
commit | 4c1fc3e404d648c70bd2f50ac50aeac6ece8872e (patch) | |
tree | 977a223a8f5aa7fc2a5861a8d557b879bfc98a9f /src/user-sessions | |
parent | 40beecdb6d1c73e5acb62ebac2ccbfd7891f2418 (diff) |
fileio: consolidate write_string_file*()
Merge write_string_file(), write_string_file_no_create() and
write_string_file_atomic() into write_string_file() and provide a flags mask
that allows combinations of atomic writing, newline appending and automatic
file creation. Change all users accordingly.
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 1c31769fde..ddeb310c3c 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_atomic("/run/nologin", "System is going down."); + r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_ATOMIC); if (r < 0) { log_error_errno(r, "Failed to create /run/nologin: %m"); return EXIT_FAILURE; |