chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f87328
)
udev: net_id - suppress bcma core == 0
author
Kay Sievers
<kay@vrfy.org>
Thu, 17 Jan 2013 02:30:07 +0000
(
03:30
+0100)
committer
Kay Sievers
<kay@vrfy.org>
Thu, 17 Jan 2013 02:30:07 +0000
(
03:30
+0100)
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 312a54a6c1368e91954bdec6c3cabf1800897a42..20d96e041daeca265e8fc3e19f462388ce931928 100644
(file)
--- a/
src/udev/udev-builtin-net_id.c
+++ b/
src/udev/udev-builtin-net_id.c
@@
-327,10
+327,13
@@
static int names_bcma(struct udev_device *dev, struct netnames *names) {
if (!bcmadev)
return -ENOENT;
- /* bus num
,
core num */
+ /* bus num
:
core num */
if (sscanf(udev_device_get_sysname(bcmadev), "bcma%*d:%d", &core) != 1)
return -EINVAL;
- snprintf(names->bcma_core, sizeof(names->bcma_core), "b%d", core);
+ /* suppress the common core == 0 */
+ if (core > 0)
+ snprintf(names->bcma_core, sizeof(names->bcma_core), "b%d", core);
+
names->type = NET_BCMA;
return 0;
}