summaryrefslogtreecommitdiff
path: root/source/a/eudev/0002-src-udev-udevd.c-add-eudev-startup-message-for-kmsg.patch
blob: 55e2bccfc11239fab8a2d16e78dba483fa0820c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 71ff5b6886946dacca8ae685ac85cdc174cfdece Mon Sep 17 00:00:00 2001
From: Richard Narron <richard@aaazen.com>
Date: Sun, 22 Nov 2015 02:27:58 -0500
Subject: [PATCH 2/2] src/udev/udevd.c: add eudev startup message for kmsg

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
---
 src/udev/udevd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index b1de97a..b3fbc27 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1125,6 +1125,7 @@ static int parse_argv(int argc, char *argv[]) {
 int main(int argc, char *argv[]) {
         struct udev *udev;
         sigset_t mask;
+        FILE *f;
         int fd_ctrl = -1;
         int fd_netlink = -1;
         int fd_worker = -1;
@@ -1277,6 +1278,12 @@ int main(int argc, char *argv[]) {
 
         udev_list_node_init(&event_list);
 
+        f = fopen("/dev/kmsg", "w");
+        if (f != NULL) {
+                fprintf(f, "<30>udevd[%u]: starting eudev-" VERSION "\n", getpid());
+                fclose(f);
+        }
+
         if (!arg_debug) {
                 int fd;
 
-- 
2.6.3