X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_add.c;h=acd678ffbaec4d76d4d450c37c067fea88ae12c7;hb=d3c3763530955a898e1d50c6844765e94ac957c2;hp=c139bd38bf0ac1bbde2f4686ddfc81b622ec8554;hpb=8673dcb84299fd2adba6281c5359bed4399d5b2d;p=elogind.git diff --git a/udev_add.c b/udev_add.c index c139bd38b..acd678ffb 100644 --- a/udev_add.c +++ b/udev_add.c @@ -38,11 +38,11 @@ #include "libsysfs/sysfs/libsysfs.h" #include "udev.h" -#include "udev_lib.h" +#include "udev_utils.h" #include "udev_version.h" #include "logging.h" #include "namedev.h" -#include "udevdb.h" +#include "udev_db.h" #include "selinux.h" @@ -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, - udev->major, udev->minor, (mode_t)udev->mode, uid, gid); + udev->major, udev->minor, udev->mode, uid, gid); } /* create all_partitions if requested */ @@ -303,8 +303,8 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev) if (retval != 0) goto exit; - if (udevdb_add_dev(udev) != 0) - dbg("udevdb_add_dev failed, but we create the node anyway, " + if (udev_db_add_device(udev) != 0) + dbg("udev_db_add_dev failed, but we create the node anyway, " "remove might not work for custom names"); /* use full path to the environment */ @@ -318,15 +318,16 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev) 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); + setenv("INTERFACE", udev->name, 1); } /* use netif name for the environment */