summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 11:42:30 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-11-28 11:42:30 -0500
commit805a4489ec125e78ff380ef1be89f0dad1e2fe87 (patch)
tree7aa227b9a4c345402aa673fd1d3604e7bd51c0eb
parentb06aadd220dd71cd97d0176612e691dcf8ac13a2 (diff)
treewide: more log_*_errno() conversions
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/udev/udev-rules.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index e13eac3bb7..411d4a4ac1 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -479,9 +479,9 @@ static uid_t add_uid(struct udev_rules *rules, const char *owner) {
r = get_user_creds(&owner, &uid, NULL, NULL, NULL);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified user '%s' unknown\n", owner);
+ log_error("specified user '%s' unknown", owner);
else
- log_error("error resolving user '%s': %s\n", owner, strerror(-r));
+ log_error_errno(r, "error resolving user '%s': %m", owner);
}
/* grow buffer if needed */
@@ -526,9 +526,9 @@ static gid_t add_gid(struct udev_rules *rules, const char *group) {
r = get_group_creds(&group, &gid);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified group '%s' unknown\n", group);
+ log_error("specified group '%s' unknown", group);
else
- log_error("error resolving group '%s': %s\n", group, strerror(-r));
+ log_error_errno(r, "error resolving group '%s': %m", group);
}
/* grow buffer if needed */
@@ -1077,7 +1077,7 @@ static int add_rule(struct udev_rules *rules, char *line,
_cleanup_free_ char *tmp;
tmp = cescape(buf);
- log_error("invalid key/value pair in file %s on line %u, starting at character %tu ('%s')\n",
+ log_error("invalid key/value pair in file %s on line %u, starting at character %tu ('%s')",
filename, lineno, linepos - line + 1, tmp);
if (linepos[1] == '#')
log_error("hint: comments can only start at beginning of line");
@@ -2335,9 +2335,9 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
r = get_user_creds(&ow, &event->uid, NULL, NULL, NULL);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified user '%s' unknown\n", owner);
+ log_error("specified user '%s' unknown", owner);
else
- log_error("error resolving user '%s': %s\n", owner, strerror(-r));
+ log_error_errno(r, "error resolving user '%s': %m", owner);
event->uid = 0;
}
@@ -2361,9 +2361,9 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
r = get_group_creds(&gr, &event->gid);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified group '%s' unknown\n", group);
+ log_error("specified group '%s' unknown", group);
else
- log_error("error resolving group '%s': %s\n", group, strerror(-r));
+ log_error_errno(r, "error resolving group '%s': %m", group);
event->gid = 0;
}