summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-11-12 18:35:18 +0100
committerKay Sievers <kay@vrfy.org>2014-11-12 18:35:18 +0100
commitb12b78712edb09a0fc28b460ebf0bb8eae5cff03 (patch)
treecaac865edbc20bada801135484a82befd9678fbb /src
parente9730b76902af3fa831ccf0c50b05fba5b228e73 (diff)
udev: use the systemd logging functions in udev tools
Diffstat (limited to 'src')
-rw-r--r--src/libudev/libudev-private.h1
-rw-r--r--src/udev/udev-rules.c16
2 files changed, 8 insertions, 9 deletions
diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h
index 7e11f7326d..40673a6686 100644
--- a/src/libudev/libudev-private.h
+++ b/src/libudev/libudev-private.h
@@ -41,7 +41,6 @@
} while (0)
#define udev_dbg(udev, arg...) udev_log_cond(udev, LOG_DEBUG, ## arg)
-#define udev_info(udev, arg...) udev_log_cond(udev, LOG_INFO, ## arg)
#define udev_err(udev, arg...) udev_log_cond(udev, LOG_ERR, ## arg)
/* libudev.c */
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 3bc25f7c26..92c4320618 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -474,9 +474,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)
- udev_err(rules->udev, "specified user '%s' unknown\n", owner);
+ log_error("specified user '%s' unknown\n", owner);
else
- udev_err(rules->udev, "error resolving user '%s': %s\n", owner, strerror(-r));
+ log_error("error resolving user '%s': %s\n", owner, strerror(-r));
}
/* grow buffer if needed */
@@ -521,9 +521,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)
- udev_err(rules->udev, "specified group '%s' unknown\n", group);
+ log_error("specified group '%s' unknown\n", group);
else
- udev_err(rules->udev, "error resolving group '%s': %s\n", group, strerror(-r));
+ log_error("error resolving group '%s': %s\n", group, strerror(-r));
}
/* grow buffer if needed */
@@ -2265,9 +2265,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)
- udev_err(event->udev, "specified user '%s' unknown\n", owner);
+ log_error(event->udev, "specified user '%s' unknown\n", owner);
else
- udev_err(event->udev, "error resolving user '%s': %s\n", owner, strerror(-r));
+ log_error(event->udev, "error resolving user '%s': %s\n", owner, strerror(-r));
event->uid = 0;
}
@@ -2291,9 +2291,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)
- udev_err(event->udev, "specified group '%s' unknown\n", group);
+ log_error(event->udev, "specified group '%s' unknown\n", group);
else
- udev_err(event->udev, "error resolving group '%s': %s\n", group, strerror(-r));
+ log_error(event->udev, "error resolving group '%s': %s\n", group, strerror(-r));
event->gid = 0;
}