projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6092117
)
udev: net_id - use constants rather than magic numbers
author
Tom Gundersen
<teg@jklm.no>
Sun, 6 Apr 2014 16:00:26 +0000
(18:00 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Sun, 6 Apr 2014 16:00:40 +0000
(18:00 +0200)
src/udev/udev-builtin-net_id.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-builtin-net_id.c
b/src/udev/udev-builtin-net_id.c
index
aa08196
..
c80c30a
100644
(file)
--- a/
src/udev/udev-builtin-net_id.c
+++ b/
src/udev/udev-builtin-net_id.c
@@
-94,6
+94,7
@@
#include <string.h>
#include <errno.h>
#include <net/if.h>
+#include <net/if_arp.h>
#include <linux/pci_regs.h>
#include "udev.h"
@@
-451,10
+452,10
@@
static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool
return EXIT_FAILURE;
i = strtoul(s, NULL, 0);
switch (i) {
- case
1: /* ARPHRD_ETHER */
+ case
ARPHRD_ETHER:
prefix = "en";
break;
- case
256: /* ARPHRD_SLIP */
+ case
ARPHRD_SLIP:
prefix = "sl";
break;
default: