summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-20 22:22:15 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-22 01:14:52 -0500
commit1fa2f38f0f011010bf57522b42fcc168856a7003 (patch)
tree7bd1a23716379826ef6cd37f98c2f02470a2d5c4 /src/libudev
parent8facc3498ed037f842891ff55d1f60fe834f4ba0 (diff)
Assorted format fixes
Types used for pids and uids in various interfaces are unpredictable. Too bad.
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/libudev-device.c2
-rw-r--r--src/libudev/libudev-monitor.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 825a0e10f4..a7446bff77 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -1686,7 +1686,7 @@ const char *udev_device_get_id_filename(struct udev_device *udev_device)
udev_device->id_filename = NULL;
} else if (udev_device_get_ifindex(udev_device) > 0) {
/* use netdev ifindex -- n3 */
- if (asprintf(&udev_device->id_filename, "n%u", udev_device_get_ifindex(udev_device)) < 0)
+ if (asprintf(&udev_device->id_filename, "n%i", udev_device_get_ifindex(udev_device)) < 0)
udev_device->id_filename = NULL;
} else {
/*
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index da2b63473f..4cfb2f617c 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -620,8 +620,8 @@ retry:
}
} else if (snl.nl.nl_groups == UDEV_MONITOR_KERNEL) {
if (snl.nl.nl_pid > 0) {
- log_debug("multicast kernel netlink message from pid %d ignored",
- snl.nl.nl_pid);
+ log_debug("multicast kernel netlink message from PID %"PRIu32" ignored",
+ snl.nl.nl_pid);
return NULL;
}
}
@@ -634,7 +634,7 @@ retry:
cred = (struct ucred *)CMSG_DATA(cmsg);
if (cred->uid != 0) {
- log_debug("sender uid=%d, message ignored", cred->uid);
+ log_debug("sender uid="UID_FMT", message ignored", cred->uid);
return NULL;
}