summaryrefslogtreecommitdiff
path: root/src/rfkill
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:19:16 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:29:21 +0100
commitda927ba997d68401563b927f92e6e40e021a8e5c (patch)
tree71764cd998aef07b8943c5206c9307a93ba9c528 /src/rfkill
parent0a1beeb64207eaa88ab9236787b1cbc2f704ae14 (diff)
downloadsystemd-da927ba997d68401563b927f92e6e40e021a8e5c.tar.gz
systemd-da927ba997d68401563b927f92e6e40e021a8e5c.tar.bz2
systemd-da927ba997d68401563b927f92e6e40e021a8e5c.zip
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values.
Diffstat (limited to 'src/rfkill')
-rw-r--r--src/rfkill/rfkill.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c
index 0acb092418..c75d6a60d8 100644
--- a/src/rfkill/rfkill.c
+++ b/src/rfkill/rfkill.c
@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
r = mkdir_p("/var/lib/systemd/rfkill", 0755);
if (r < 0) {
- log_error_errno(-r, "Failed to create rfkill directory: %m");
+ log_error_errno(r, "Failed to create rfkill directory: %m");
return EXIT_FAILURE;
}
@@ -107,13 +107,13 @@ int main(int argc, char *argv[]) {
if (r == -ENOENT)
return EXIT_SUCCESS;
- log_error_errno(-r, "Failed to read %s: %m", saved);
+ log_error_errno(r, "Failed to read %s: %m", saved);
return EXIT_FAILURE;
}
r = udev_device_set_sysattr_value(device, "soft", value);
if (r < 0) {
- log_error_errno(-r, "Failed to write system attribute: %m");
+ log_error_errno(r, "Failed to write system attribute: %m");
return EXIT_FAILURE;
}
@@ -122,13 +122,13 @@ int main(int argc, char *argv[]) {
value = udev_device_get_sysattr_value(device, "soft");
if (!value) {
- log_error_errno(-r, "Failed to read system attribute: %m");
+ log_error_errno(r, "Failed to read system attribute: %m");
return EXIT_FAILURE;
}
r = write_string_file(saved, value);
if (r < 0) {
- log_error_errno(-r, "Failed to write %s: %m", saved);
+ log_error_errno(r, "Failed to write %s: %m", saved);
return EXIT_FAILURE;
}