valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0155-udev-net_id-fix-copy-paste-error.patch

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