]> err.no Git - systemd/commitdiff
[PATCH] fix devpath for netdev
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Fri, 9 Apr 2004 01:49:27 +0000 (18:49 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:35:15 +0000 (21:35 -0700)
Fix the devpath string for unhandled netdev's.

udev-add.c

index 5dc46cf2a71ecf87d15512b475b29fab9e293a19..900e4795aa0d5bc977be9d88427ad781061fd34f 100644 (file)
@@ -453,6 +453,7 @@ int udev_add_device(char *path, char *subsystem, int fake)
                break;
 
        case 'n':
+               strfieldcpy(devpath, path);
                if (strcmp(dev.name, dev.kernel_name) != 0) {
                        retval = rename_net_if(&dev, fake);
                        if (retval != 0)
@@ -460,7 +461,6 @@ int udev_add_device(char *path, char *subsystem, int fake)
                        /* netif's are keyed with the configured name, cause
                         * the original kernel name sleeps with the fishes
                         */
-                       strfieldcpy(devpath, path);
                        pos = strrchr(devpath, '/');
                        if (pos != NULL) {
                                pos[1] = '\0';