1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-30 14:55:26 +03:00

[PATCH] fix devpath for netdev

Fix the devpath string for unhandled netdev's.
This commit is contained in:
kay.sievers@vrfy.org 2004-04-08 18:49:27 -07:00 committed by Greg KH
parent 4b06c852cb
commit a41de03083

View 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';