diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 11:30:06 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-11-28 11:30:06 -0500 |
commit | b06aadd220dd71cd97d0176612e691dcf8ac13a2 (patch) | |
tree | 71b3fe0f6504573ed1ea308dd3b973f0883e7dd1 /src | |
parent | 146b012e50e133f46b920ec1f8ab1ac719011226 (diff) |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/udev/udev-builtin-keyboard.c | 2 | ||||
-rw-r--r-- | src/udev/udev-ctrl.c | 2 | ||||
-rw-r--r-- | src/udev/udev-node.c | 4 | ||||
-rw-r--r-- | src/udev/udev-rules.c | 4 | ||||
-rw-r--r-- | src/udev/udevadm-hwdb.c | 4 | ||||
-rw-r--r-- | src/udev/udevd.c | 6 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/udev/udev-builtin-keyboard.c b/src/udev/udev-builtin-keyboard.c index 6628ac873f..2deb8b9fbb 100644 --- a/src/udev/udev-builtin-keyboard.c +++ b/src/udev/udev-builtin-keyboard.c @@ -62,7 +62,7 @@ static int install_force_release(struct udev_device *dev, const unsigned int *re log_debug("keyboard: updating force-release list with '%s'", codes); ret = udev_device_set_sysattr_value(atkbd, "force_release", codes); if (ret < 0) - log_error_errno(-ret, "Error writing force-release attribute: %m"); + log_error_errno(ret, "Error writing force-release attribute: %m"); return ret; } diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index 7f0c957630..8581732821 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -216,7 +216,7 @@ struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl) { /* check peer credential of connection */ r = getpeercred(conn->sock, &ucred); if (r < 0) { - log_error_errno(-r, "unable to receive credentials of ctrl connection: %m"); + log_error_errno(r, "unable to receive credentials of ctrl connection: %m"); goto err; } if (ucred.uid > 0) { diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index f105fa28e2..c9a273d003 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -304,7 +304,7 @@ static int node_permissions_apply(struct udev_device *dev, bool apply, r = mac_selinux_apply(devnode, label); if (r < 0) - log_error_errno(-r, "SECLABEL: failed to set SELinux label '%s': %m", label); + log_error_errno(r, "SECLABEL: failed to set SELinux label '%s': %m", label); else log_debug("SECLABEL: set SELinux label '%s'", label); @@ -313,7 +313,7 @@ static int node_permissions_apply(struct udev_device *dev, bool apply, r = mac_smack_apply(devnode, label); if (r < 0) - log_error_errno(-r, "SECLABEL: failed to set SMACK label '%s': %m", label); + log_error_errno(r, "SECLABEL: failed to set SMACK label '%s': %m", label); else log_debug("SECLABEL: set SMACK label '%s'", label); diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 28b999ad87..e13eac3bb7 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1690,7 +1690,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) { r = conf_files_list_strv(&files, ".rules", NULL, rules_dirs); if (r < 0) { - log_error_errno(-r, "failed to enumerate rules files: %m"); + log_error_errno(r, "failed to enumerate rules files: %m"); return udev_rules_unref(rules); } @@ -2711,7 +2711,7 @@ int udev_rules_apply_static_dev_perms(struct udev_rules *rules) { strscpyl(tags_dir, sizeof(tags_dir), "/run/udev/static_node-tags/", *t, "/", NULL); r = mkdir_p(tags_dir, 0755); if (r < 0) { - log_error_errno(-r, "failed to create %s: %m", tags_dir); + log_error_errno(r, "failed to create %s: %m", tags_dir); return r; } diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 8e8059c5af..eededa9b2b 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -615,7 +615,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { err = conf_files_list_strv(&files, ".hwdb", root, conf_file_dirs); if (err < 0) { - log_error_errno(-err, "failed to enumerate hwdb files: %m"); + log_error_errno(err, "failed to enumerate hwdb files: %m"); rc = EXIT_FAILURE; goto out; } @@ -648,7 +648,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { mkdir_parents(hwdb_bin, 0755); err = trie_store(trie, hwdb_bin); if (err < 0) { - log_error_errno(-err, "Failure writing database %s: %m", hwdb_bin); + log_error_errno(err, "Failure writing database %s: %m", hwdb_bin); rc = EXIT_FAILURE; } } diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 2b6dc2c79c..fad0b11179 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -989,7 +989,7 @@ static void kernel_cmdline_options(struct udev *udev) { r = proc_cmdline(&line); if (r < 0) { - log_warning_errno(-r, "Failed to read /proc/cmdline, ignoring: %m"); + log_warning_errno(r, "Failed to read /proc/cmdline, ignoring: %m"); return; } @@ -1161,7 +1161,7 @@ int main(int argc, char *argv[]) { r = mac_selinux_init("/dev"); if (r < 0) { - log_error_errno(-r, "could not initialize labelling: %m"); + log_error_errno(r, "could not initialize labelling: %m"); goto exit; } @@ -1245,7 +1245,7 @@ int main(int argc, char *argv[]) { rc = udev_rules_apply_static_dev_perms(rules); if (rc < 0) - log_error_errno(-rc, "failed to apply permissions on static device nodes - %m"); + log_error_errno(rc, "failed to apply permissions on static device nodes - %m"); if (arg_daemonize) { pid_t pid; |