|
|
17b0f1 |
From 127c3f7b5ca3158851dc4a747f664ce43b2a94ee Mon Sep 17 00:00:00 2001
|
|
|
17b0f1 |
From: Tom Gundersen <teg@jklm.no>
|
|
|
17b0f1 |
Date: Wed, 1 Apr 2015 23:34:19 +0200
|
|
|
17b0f1 |
Subject: [PATCH] udev: net_id - improve comments
|
|
|
17b0f1 |
|
|
|
17b0f1 |
The dev_port concept is a bit confusing, expand on the comment a bit.
|
|
|
17b0f1 |
|
|
|
17b0f1 |
Conflicts:
|
|
|
17b0f1 |
src/udev/udev-builtin-net_id.c
|
|
|
17b0f1 |
---
|
|
|
17b0f1 |
src/udev/udev-builtin-net_id.c | 4 ++--
|
|
|
17b0f1 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
|
|
|
17b0f1 |
index 6a5ada6883..2cc1fd409b 100644
|
|
|
17b0f1 |
--- a/src/udev/udev-builtin-net_id.c
|
|
|
17b0f1 |
+++ b/src/udev/udev-builtin-net_id.c
|
|
|
17b0f1 |
@@ -146,7 +146,7 @@ static int dev_pci_onboard(struct udev_device *dev, struct netnames *names) {
|
|
|
17b0f1 |
if (idx <= 0)
|
|
|
17b0f1 |
return -EINVAL;
|
|
|
17b0f1 |
|
|
|
17b0f1 |
- /* kernel provided multi-device index */
|
|
|
17b0f1 |
+ /* kernel provided port index for multiple ports on a single PCI function */
|
|
|
17b0f1 |
attr = udev_device_get_sysattr_value(dev, "dev_port");
|
|
|
17b0f1 |
if (attr)
|
|
|
17b0f1 |
dev_port = strtol(attr, NULL, 10);
|
|
|
17b0f1 |
@@ -199,7 +199,7 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
|
|
|
17b0f1 |
if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%u", &domain, &bus, &slot, &func) != 4)
|
|
|
17b0f1 |
return -ENOENT;
|
|
|
17b0f1 |
|
|
|
17b0f1 |
- /* kernel provided multi-device index */
|
|
|
17b0f1 |
+ /* kernel provided port index for multiple ports on a single PCI function */
|
|
|
17b0f1 |
attr = udev_device_get_sysattr_value(dev, "dev_id");
|
|
|
17b0f1 |
if (attr) {
|
|
|
17b0f1 |
dev_id = strtol(attr, NULL, 16);
|