chiark / gitweb /
udev: net_id - improve comments
authorTom Gundersen <teg@jklm.no>
Wed, 1 Apr 2015 21:34:19 +0000 (23:34 +0200)
committerTom Gundersen <teg@jklm.no>
Wed, 1 Apr 2015 21:34:19 +0000 (23:34 +0200)
The dev_port concept is a bit confusing, expand on the comment a bit.

src/udev/udev-builtin-net_id.c

index 0f5b11d4d18a873274c1362a5079e03822865c1c..78aef206b2e9a4d916539687339958e2a7673801 100644 (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);