udev: net_id - improve comments

The dev_port concept is a bit confusing, expand on the comment a bit.
This commit is contained in:
Tom Gundersen 2015-04-01 23:34:19 +02:00
parent c0a43734ca
commit 309b578d31
1 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ static int dev_pci_onboard(struct udev_device *dev, struct netnames *names) {
if (idx <= 0)
return -EINVAL;
/* kernel provided multi-device index */
/* kernel provided port index for multiple ports on a single PCI function */
attr = udev_device_get_sysattr_value(dev, "dev_port");
if (attr)
dev_port = strtol(attr, NULL, 10);
@ -199,7 +199,7 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%u", &domain, &bus, &slot, &func) != 4)
return -ENOENT;
/* kernel provided multi-device index */
/* kernel provided port index for multiple ports on a single PCI function */
attr = udev_device_get_sysattr_value(dev, "dev_port");
if (attr)
dev_port = strtol(attr, NULL, 10);