chiark / gitweb /
udev: net_id - fix copy-paste error
authorTom Gundersen <teg@jklm.no>
Wed, 1 Apr 2015 14:41:41 +0000 (16:41 +0200)
committerTom Gundersen <teg@jklm.no>
Wed, 1 Apr 2015 20:56:26 +0000 (22:56 +0200)
In case pci_slot overflows we were truncating pci_path instead.

src/udev/udev-builtin-net_id.c

index 37ff1b800882a2a2d9c13a59d21c35d18bd23682..71f3a5970f01353ff259ec7b2b626756ebcbb133 100644 (file)
@@ -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);