richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
1ff636
From 400756b14b8272138ba27fdac9a3ec1fddeff676 Mon Sep 17 00:00:00 2001
1ff636
From: Tom Gundersen <teg@jklm.no>
1ff636
Date: Wed, 1 Apr 2015 16:41:41 +0200
1ff636
Subject: [PATCH] udev: net_id - fix copy-paste error
1ff636
1ff636
In case pci_slot overflows we were truncating pci_path instead.
1ff636
1ff636
(cherry picked from commit 16f948cb208f1db9a1665f07ac9b22e416dc19d4)
1ff636
1ff636
Cherry-picked from: 1269e4e
1ff636
Resolves: #1222517
1ff636
---
1ff636
 src/udev/udev-builtin-net_id.c | 2 +-
1ff636
 1 file changed, 1 insertion(+), 1 deletion(-)
1ff636
1ff636
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
c62b8e
index 2cc1fd409b..66474f7728 100644
1ff636
--- a/src/udev/udev-builtin-net_id.c
1ff636
+++ b/src/udev/udev-builtin-net_id.c
1ff636
@@ -271,7 +271,7 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
1ff636
                 if (dev_id > 0)
1ff636
                         l = strpcpyf(&s, l, "d%d", dev_id);
1ff636
                 if (l == 0)
1ff636
-                        names->pci_path[0] = '\0';
1ff636
+                        names->pci_slot[0] = '\0';
1ff636
         }
1ff636
 out:
1ff636
         udev_device_unref(pci);