diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-05-04 02:24:42 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-04 09:41:43 +0200 |
commit | e6547a7e95e468463b303bcaeb43fa68e1832382 (patch) | |
tree | f01081abc4b2c6adfea16d45e3cca7f09e74b9ce /Userland/sysctl.cpp | |
parent | de0ed0e2dc541e1308fb176f4a496bfffbb8bc0f (diff) | |
download | serenity-e6547a7e95e468463b303bcaeb43fa68e1832382.zip |
sysctl: Fix newlines in error messages
Diffstat (limited to 'Userland/sysctl.cpp')
-rw-r--r-- | Userland/sysctl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/sysctl.cpp b/Userland/sysctl.cpp index 1f71f22cf9..5eaa76b5eb 100644 --- a/Userland/sysctl.cpp +++ b/Userland/sysctl.cpp @@ -45,12 +45,12 @@ static String read_var(const String& name) auto path = builder.to_string(); auto f = Core::File::construct(path); if (!f->open(Core::IODevice::ReadOnly)) { - fprintf(stderr, "open: %s", f->error_string()); + fprintf(stderr, "open: %s\n", f->error_string()); exit(1); } const auto& b = f->read_all(); if (f->error() < 0) { - fprintf(stderr, "read: %s", f->error_string()); + fprintf(stderr, "read: %s\n", f->error_string()); exit(1); } return String((const char*)b.data(), b.size(), Chomp); @@ -64,12 +64,12 @@ static void write_var(const String& name, const String& value) auto path = builder.to_string(); auto f = Core::File::construct(path); if (!f->open(Core::IODevice::WriteOnly)) { - fprintf(stderr, "open: %s", f->error_string()); + fprintf(stderr, "open: %s\n", f->error_string()); exit(1); } f->write(value); if (f->error() < 0) { - fprintf(stderr, "write: %s", f->error_string()); + fprintf(stderr, "write: %s\n", f->error_string()); exit(1); } } |