From 1c2311c5568ddc6c3010afc02e5894e9b22a1c51 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 18 Oct 2010 12:50:20 +0200 Subject: return proper error code in rename_netif() kay: can you look at rename_netif()? it returns -errno in a place, but I think that it may by changed by err() (at least) Md: yeah, that doesn't look correct --- udev/udev-event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udev/udev-event.c b/udev/udev-event.c index ae523f83c5..064873531b 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -472,8 +472,9 @@ static int rename_netif(struct udev_event *event) sk = socket(PF_INET, SOCK_DGRAM, 0); if (sk < 0) { + err = -errno; err(event->udev, "error opening socket: %m\n"); - return -errno; + return err; } memset(&ifr, 0x00, sizeof(struct ifreq)); -- cgit v1.2.3-54-g00ecf