Blob Blame History Raw
From e219205ca3accd36ce59ed19bb0e6d079311d505 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Wed, 1 Apr 2015 16:41:41 +0200
Subject: [PATCH] udev: net_id - fix copy-paste error

In case pci_slot overflows we were truncating pci_path instead.

(cherry picked from commit 16f948cb208f1db9a1665f07ac9b22e416dc19d4)
---
 src/udev/udev-builtin-net_id.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index 37ff1b8008..71f3a5970f 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -248,7 +248,7 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
                 if (dev_port > 0)
                         l = strpcpyf(&s, l, "d%d", dev_port);
                 if (l == 0)
-                        names->pci_path[0] = '\0';
+                        names->pci_slot[0] = '\0';
         }
 out:
         udev_device_unref(pci);