[systemd-commits] 2 commits - src/libudev src/udev
Tom Gundersen
tomegun at kemper.freedesktop.org
Tue Sep 9 13:49:05 PDT 2014
src/libudev/libudev-private.h | 1 -
src/libudev/libudev-util.c | 25 -------------------------
src/udev/udev-event.c | 2 +-
src/udev/udevd.c | 2 +-
4 files changed, 2 insertions(+), 28 deletions(-)
New commits:
commit 9d19a679f23c7a72c326cbbbf44e0c9f423dec5d
Author: Tom Gundersen <teg at jklm.no>
Date: Tue Sep 9 22:48:07 2014 +0200
udev - drop print_kmsg
The only remaining user was 'starting version XXX', which is now logged using log_info().
diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h
index ae97557..cd1c1fb 100644
--- a/src/libudev/libudev-private.h
+++ b/src/libudev/libudev-private.h
@@ -170,6 +170,5 @@ int util_delete_path(struct udev *udev, const char *path);
uid_t util_lookup_user(struct udev *udev, const char *user);
gid_t util_lookup_group(struct udev *udev, const char *group);
int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value);
-ssize_t print_kmsg(const char *fmt, ...) _printf_(1, 2);
#endif
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
index d9cdde1..9e19e31 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/libudev-util.c
@@ -415,28 +415,3 @@ uint64_t util_string_bloom64(const char *str)
bits |= 1LLU << ((hash >> 18) & 63);
return bits;
}
-
-ssize_t print_kmsg(const char *fmt, ...)
-{
- _cleanup_close_ int fd = -1;
- va_list ap;
- char text[1024];
- ssize_t len;
- ssize_t ret;
-
- fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC);
- if (fd < 0)
- return -errno;
-
- len = snprintf(text, sizeof(text), "<30>systemd-udevd[%u]: ", getpid());
-
- va_start(ap, fmt);
- len += vsnprintf(text + len, sizeof(text) - len, fmt, ap);
- va_end(ap);
-
- ret = write(fd, text, len);
- if (ret < 0)
- return -errno;
-
- return ret;
-}
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index be0acc3..b023b6e 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1200,7 +1200,7 @@ int main(int argc, char *argv[]) {
sd_notify(1, "READY=1");
}
- print_kmsg("starting version " VERSION "\n");
+ log_info("starting version " VERSION "\n");
if (!debug) {
int fd;
commit 1187f20655de0c37337ea73e1e55823b83cd7c00
Author: Tom Gundersen <teg at jklm.no>
Date: Tue Sep 9 22:45:03 2014 +0200
udev: netif_rename - don't log to kmsg
As of 3.17, the kernel will do this on its own, so just do regular log_debug() logging from udev.
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 1bbf41e..a883edc 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -762,7 +762,7 @@ static int rename_netif(struct udev_event *event) {
return r;
}
- print_kmsg("renamed network interface '%s' to '%s'\n", oldname, name);
+ log_debug("renamed network interface '%s' to '%s'\n", oldname, name);
return 0;
}
More information about the systemd-commits
mailing list