From: Kay Sievers Date: Mon, 18 Oct 2010 10:50:20 +0000 (+0200) Subject: return proper error code in rename_netif() X-Git-Tag: 174~318 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c2311c5568ddc6c3010afc02e5894e9b22a1c51;p=systemd 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 --- diff --git a/udev/udev-event.c b/udev/udev-event.c index ae523f83..06487353 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));