diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-02 20:31:42 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-03 20:12:56 +0200 |
commit | 574d5f2dfc25226afc718aa5ba1a145fe5cad221 (patch) | |
tree | 01fc6b70bd622d40da1c60fd04d1f15c85aebd93 /src/sleep | |
parent | core/killall.c: prevent segfault and initialize pids (diff) | |
download | systemd-574d5f2dfc25226afc718aa5ba1a145fe5cad221.tar.gz systemd-574d5f2dfc25226afc718aa5ba1a145fe5cad221.tar.bz2 systemd-574d5f2dfc25226afc718aa5ba1a145fe5cad221.zip |
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.
Diffstat (limited to 'src/sleep')
-rw-r--r-- | src/sleep/sleep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 070762546..f5e78c13c 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"); |