summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-14 00:32:47 +0200
committerKay Sievers <kay@vrfy.org>2012-07-14 00:33:59 +0200
commitc6eefe366470e1cf6c94f52dd923dc822eb5d027 (patch)
tree119a52b2b185274f6890acc9d4f89de8a6b4b54d /src/udev/udev-event.c
parent95694951a0905dd748c6902268b15e3a56632da2 (diff)
udev: avoid creating /dev/kmsg with fopen() to support CONFIG_PRINTK=n
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 46e579dce2..d5dd1f3ba4 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -767,14 +767,7 @@ static int rename_netif(struct udev_event *event)
util_strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
err = ioctl(sk, SIOCSIFNAME, &ifr);
if (err >= 0) {
- FILE *f;
-
- f = fopen("/dev/kmsg", "we");
- if (f != NULL) {
- fprintf(f, "<30>systemd-udevd[%u]: renamed network interface %s to %s\n",
- getpid(), ifr.ifr_name, ifr.ifr_newname);
- fclose(f);
- }
+ print_kmsg("renamed network interface %s to %s", ifr.ifr_name, ifr.ifr_newname);
} else {
err = -errno;
log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname);