* - physical/geographical location of the hardware
* - the interface's MAC address
*
+ * http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
+ *
* Two character prefixes based on the type of interface:
* en -- ethernet
* wl -- wlan
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;
}