diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml index 126be320f6..70b4b27d7b 100644 --- a/man/systemd.net-naming-scheme.xml +++ b/man/systemd.net-naming-scheme.xml @@ -99,8 +99,8 @@ ID_NET_NAME_ONBOARD=prefixonumber - This name is set based on the ordering information given by the firmware for - on-board devices. The name consists of the prefix, letter o, and a number + This name is set based on the numeric ordering information given by the firmware + for on-board devices. The name consists of the prefix, letter o, and a number specified by the firmware. This is only available for PCI devices. @@ -108,8 +108,9 @@ ID_NET_LABEL_ONBOARD=prefix label - This property is set based on label given by the firmware for on-board devices. The - name consists of the prefix concatenated with the label. This is only available for PCI devices. + This property is set based on textual label given by the firmware for on-board + devices. The name consists of the prefix concatenated with the label. This is only available for + PCI devices. @@ -126,15 +127,15 @@ ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port] + ID_NET_NAME_SLOT=prefixvslot ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]bnumber ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]uport…[cconfig][iinterface] ID_NET_NAME_SLOT=prefix[Pdomain]sslot[ffunction][nport_name|ddev_port]vslot This property describes the slot position. Different schemes are used depending on - the bus type, as described in the table below. In all cases, PCI slot information must be known. In - case of USB, BCMA, and SR-VIO devices, the full name consists of the prefix, PCI slot identifier, - and USB or BCMA or SR-VIO slot identifier. The first two parts are denoted as "…" in the table - below. + the bus type, as described in the table below. In case of USB, BCMA, and SR-VIO devices, the full + name consists of the prefix, PCI slot identifier, and USB or BCMA or SR-VIO slot identifier. The + first two parts are denoted as "…" in the table below. Slot naming schemes @@ -153,6 +154,11 @@ PCI slot number + + prefix vslot + VIO slot number (IBM PowerVM) + + … bnumber Broadcom bus (BCMA) core number @@ -182,11 +188,11 @@ For USB devices the full chain of port numbers of hubs is composed. If the name gets longer than the maximum number of 15 characters, the name is not exported. The usual USB configuration number 1 and interface number 0 values are suppressed. - SR-IOV virtual devices are named based on the name of the parent interface, with a suffix of v and the virtual device number, with any leading zeros removed. The bus - number is ignored. This device type is found in IBM PowerVMs. + number is ignored. + diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index e94fff2520..169d6ce8f7 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -330,8 +330,9 @@ static int dev_pci_slot(sd_device *dev, struct netnames *names) { char str[PATH_MAX]; _cleanup_free_ char *address = NULL; - if (dent->d_name[0] == '.') + if (dot_or_dot_dot(dent->d_name)) continue; + r = safe_atou_full(dent->d_name, 10, &i); if (r < 0 || i <= 0) continue;