systemd/1073-udev-drop-print_kmsg.patch

76 lines
2.4 KiB
Diff
Raw Normal View History

Accepting request 249581 from Base:System - Add upstream patches as real fixes 0001-activate-fix-fd-leak-in-do_accept.patch 0002-analyze-avoid-a-null-dereference.patch 0003-analyze-fix-mem-leak.patch 0004-backlight-Avoid-error-when-state-restore-is-disabled.patch 0005-bus-avoid-using-m-kdbus-after-freeing-it.patch 0006-bus-unref-buscreds-on-failure.patch 0007-core-fix-a-potential-mem-leak.patch 0008-core-smack-setup-Actually-allow-for-succesfully-load.patch 0009-journal-do-not-leak-mmaps-on-OOM.patch 0010-manager-use-correct-cleanup-function.patch - Intergrate the work of Robert and rename the patch 1068-udev-remove-userspace-firmware-loading-support.patch to 1078-udev-remove-userspace-firmware-loading-support.patch Also add patch 1079-udev-remove-userspace-firmware-loading-support.patch to apply the same change for opensuse 13.2 and above - Add upstream patch 0001-systemctl-allow-to-change-the-default-target-without.patch to allow to override default target without --force (bnc#896664) - Add upstream patches for udev 1068-udev-net_setup_link-export-the-.link-filename-applie.patch 1069-rules-net-setup-link-preserve-ID_NET_LINK_FILE-and-I.patch 1070-rules-net-setup-link-remove-stray-linebreak.patch 1071-udev-import-the-full-db-on-MOVE-events-for-devices-w.patch 1072-udev-netif_rename-don-t-log-to-kmsg.patch 1073-udev-drop-print_kmsg.patch 1074-udev-fix-copy-paste-error-in-log-message.patch OBS-URL: https://build.opensuse.org/request/show/249581 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=206
2014-09-17 17:41:54 +02:00
Based on 9d19a679f23c7a72c326cbbbf44e0c9f423dec5d Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Tue, 9 Sep 2014 22:48:07 +0200
Subject: [PATCH] udev - drop print_kmsg
The only remaining user was 'starting version XXX', which is now logged using log_info().
---
src/libudev/libudev-private.h | 1 -
src/libudev/libudev-util.c | 25 -------------------------
src/udev/udevd.c | 2 +-
3 files changed, 1 insertion(+), 27 deletions(-)
diff --git src/libudev/libudev-private.h src/libudev/libudev-private.h
index ae97557..cd1c1fb 100644
--- src/libudev/libudev-private.h
+++ 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
--- src/libudev/libudev-util.c
+++ src/libudev/libudev-util.c 2014-09-16 08:56:01.862736270 +0000
@@ -422,33 +422,3 @@ static int parse_proc_cmdline_word(const
return 0;
}
-
-ssize_t print_kmsg(const char *fmt, ...)
-{
- _cleanup_close_ int fd = -1;
- va_list ap;
- char text[1024];
- ssize_t len;
- ssize_t ret;
-
- if (parse_proc_cmdline(parse_proc_cmdline_word) == -115) {
- fd = open("/dev/null", O_WRONLY|O_NOCTTY|O_CLOEXEC);
- } else {
- 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 src/udev/udevd.c src/udev/udevd.c
index be0acc3..b023b6e 100644
--- src/udev/udevd.c
+++ 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;
--
1.7.9.2