chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] handle renamed network interfaces properly if we manage hotplug.d/
[elogind.git]
/
udev_add.c
diff --git
a/udev_add.c
b/udev_add.c
index f537f567ccdfb36c034af288cc26841f9191d9d7..acd678ffbaec4d76d4d450c37c067fea88ae12c7 100644
(file)
--- a/
udev_add.c
+++ b/
udev_add.c
@@
-189,7
+189,7
@@
static int create_node(struct udevice *udev)
} else {
info("creating device node '%s', major = '%d', minor = '%d', "
"mode = '%#o', uid = '%d', gid = '%d'", filename,
} else {
info("creating device node '%s', major = '%d', minor = '%d', "
"mode = '%#o', uid = '%d', gid = '%d'", filename,
- udev->major, udev->minor,
(mode_t)
udev->mode, uid, gid);
+ udev->major, udev->minor, udev->mode, uid, gid);
}
/* create all_partitions if requested */
}
/* create all_partitions if requested */
@@
-318,15
+318,16
@@
int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
if (retval != 0)
goto exit;
if (retval != 0)
goto exit;
- /* we've changed the name, now fake the devpath,
- *
cause original kernel name sleeps with the fishes
- *
and we don't get any event from the kernel now
+ /* we've changed the name, now fake the devpath,
cause the
+ *
original kernel name sleeps with the fishes and we don't
+ *
get an event from the kernel with the new name
*/
pos = strrchr(udev->devpath, '/');
if (pos != NULL) {
pos[1] = '\0';
strfieldcat(udev->devpath, udev->name);
setenv("DEVPATH", udev->devpath, 1);
*/
pos = strrchr(udev->devpath, '/');
if (pos != NULL) {
pos[1] = '\0';
strfieldcat(udev->devpath, udev->name);
setenv("DEVPATH", udev->devpath, 1);
+ setenv("INTERFACE", udev->name, 1);
}
/* use netif name for the environment */
}
/* use netif name for the environment */