summaryrefslogtreecommitdiff
path: root/src/sleep
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-02 20:31:42 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-03 20:12:56 +0200
commit574d5f2dfc25226afc718aa5ba1a145fe5cad221 (patch)
tree01fc6b70bd622d40da1c60fd04d1f15c85aebd93 /src/sleep
parentb6e8f1f03dc8b7579f8c6b00372f136d74c45232 (diff)
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.c10
1 files changed, 5 insertions, 5 deletions
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");