diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-06 19:19:25 -0400 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:05:56 +0100 |
commit | 1c41caca9ff73085513b988edbb341e076244298 (patch) | |
tree | 3fb413c5e6fbfa4c1bc807e2f1c118ad43b26c15 /src/login | |
parent | ce5792dac67c5ae5656f1f9665b777d44af4cb35 (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/login')
-rw-r--r-- | src/login/logind-dbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 0cc2cdf99..dbe8cae60 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1196,7 +1196,7 @@ static int trigger_device(Manager *m, struct udev_device *d) { if (!t) return -ENOMEM; - write_string_file(t, "change"); + write_string_file(t, "change", WRITE_STRING_FILE_CREATE); } return 0; @@ -1795,7 +1795,7 @@ static int nologin_timeout_handler( log_info("Creating /run/nologin, blocking further logins..."); - 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"); else |