summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-10-18 12:50:20 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-10-18 12:55:06 +0200
commit1c2311c5568ddc6c3010afc02e5894e9b22a1c51 (patch)
tree8fd1fb1ac5548fae558a776c31f6a89dd429e24a /udev
parent60d19551d8b532338a6f309f9186a5163121c9fe (diff)
return proper error code in rename_netif()
<Md> 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) <kay> Md: yeah, that doesn't look correct
Diffstat (limited to 'udev')
-rw-r--r--udev/udev-event.c3
1 files changed, 2 insertions, 1 deletions
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));