projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc4d06f
)
initialize device names earlier
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 3 Apr 2011 16:52:31 +0000
(18:52 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 3 Apr 2011 16:52:31 +0000
(18:52 +0200)
device.c
patch
|
blob
|
history
diff --git
a/device.c
b/device.c
index 1f84a83ee66cd20ba824442d3c5df42494a839e3..0efdba5c90d20e5abf76f90534c56a9e78dc4977 100644
(file)
--- a/
device.c
+++ b/
device.c
@@
-93,12
+93,12
@@
void init_virtual_device(struct device *dev, const struct device_type *type, con
assert(dev);
assert(type);
+ if (name)
+ strncpy(dev->ifname, name, IFNAMSIZ);
+
fprintf(stderr, "Initialize interface '%s'\n", dev->ifname);
INIT_LIST_HEAD(&dev->users);
dev->type = type;
-
- if (name)
- strncpy(dev->ifname, name, IFNAMSIZ);
}
int init_device(struct device *dev, const struct device_type *type, const char *ifname)