From 4c1fc3e404d648c70bd2f50ac50aeac6ece8872e Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 6 Jul 2015 19:19:25 -0400 Subject: 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. --- src/sleep/sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sleep') diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 2be63b40c6..2b2310152d 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -42,7 +42,7 @@ static int write_mode(char **modes) { STRV_FOREACH(mode, modes) { int k; - k = write_string_file("/sys/power/disk", *mode); + k = write_string_file("/sys/power/disk", *mode, 0); if (k == 0) return 0; -- cgit v1.2.3-54-g00ecf