From 574d5f2dfc25226afc718aa5ba1a145fe5cad221 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 2 Apr 2013 20:31:42 +0200 Subject: util: rename write_one_line_file() to write_string_file() You can write much more than just one line with this call (and we frequently do), so let's correct the naming. --- src/sleep/sleep.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sleep') diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 070762546b..f5e78c13c6 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -57,12 +57,12 @@ int main(int argc, char *argv[]) { /* Configure the hibernation mode */ if (streq(argv[1], "hibernate")) { - if (write_one_line_file("/sys/power/disk", "platform") < 0) - write_one_line_file("/sys/power/disk", "shutdown"); + if (write_string_file("/sys/power/disk", "platform") < 0) + write_string_file("/sys/power/disk", "shutdown"); } else if (streq(argv[1], "hybrid-sleep")) { - if (write_one_line_file("/sys/power/disk", "suspend") < 0) - if (write_one_line_file("/sys/power/disk", "platform") < 0) - write_one_line_file("/sys/power/disk", "shutdown"); + if (write_string_file("/sys/power/disk", "suspend") < 0) + if (write_string_file("/sys/power/disk", "platform") < 0) + write_string_file("/sys/power/disk", "shutdown"); } f = fopen("/sys/power/state", "we"); -- cgit v1.2.3