dryang / rpms / systemd

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