mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-28 06:35:34 +07:00
udev: use the systemd logging functions in udev tools
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
e2c392176c
commit
d1952898c7
@ -42,7 +42,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 */
|
||||
|
@ -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)
|
||||
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 */
|
||||
@ -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)
|
||||
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 */
|
||||
@ -2334,9 +2334,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;
|
||||
}
|
||||
@ -2360,9 +2360,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user