summaryrefslogtreecommitdiffstats
path: root/src/hibernate-resume
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-07 01:19:25 +0200
committerDaniel Mack <daniel@zonque.org>2015-07-07 01:19:25 +0200
commit4c1fc3e404d648c70bd2f50ac50aeac6ece8872e (patch)
tree977a223a8f5aa7fc2a5861a8d557b879bfc98a9f /src/hibernate-resume
parentfileio: add 'enforce_newline' argument to write_string_stream() (diff)
downloadsystemd-4c1fc3e404d648c70bd2f50ac50aeac6ece8872e.tar.xz
systemd-4c1fc3e404d648c70bd2f50ac50aeac6ece8872e.zip
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/hibernate-resume')
-rw-r--r--src/hibernate-resume/hibernate-resume.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
index 43aac616b6..1f3b169905 100644
--- a/src/hibernate-resume/hibernate-resume.c
+++ b/src/hibernate-resume/hibernate-resume.c
@@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- r = write_string_file("/sys/power/resume", major_minor);
+ r = write_string_file("/sys/power/resume", major_minor, WRITE_STRING_FILE_CREATE);
if (r < 0) {
log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
return EXIT_FAILURE;