From: Kay Sievers Date: Mon, 3 May 2010 16:08:51 +0000 (+0200) Subject: remove unused parameter from udev_node_mknod() X-Git-Tag: 174~508 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7cdd8b2d28ff56211ac9ce54805f5568ffa7346;p=systemd remove unused parameter from udev_node_mknod() --- diff --git a/udev/udev-event.c b/udev/udev-event.c index 2d8becd8..1e7a2ea3 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -380,7 +380,7 @@ subst: minor(udev_device_get_devnum(dev))); if (event->tmp_node == NULL) break; - udev_node_mknod(dev, event->tmp_node, makedev(0, 0), 0600, 0, 0); + udev_node_mknod(dev, event->tmp_node, 0600, 0, 0); l = util_strpcpy(&s, l, event->tmp_node); break; } diff --git a/udev/udev-node.c b/udev/udev-node.c index 780cd707..d55700d7 100644 --- a/udev/udev-node.c +++ b/udev/udev-node.c @@ -33,14 +33,13 @@ #define TMP_FILE_EXT ".udev-tmp" -int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mode_t mode, uid_t uid, gid_t gid) +int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_t uid, gid_t gid) { struct udev *udev = udev_device_get_udev(dev); + dev_t devnum = udev_device_get_devnum(dev); struct stat stats; int err = 0; - if (major(devnum) == 0) - devnum = udev_device_get_devnum(dev); if (strcmp(udev_device_get_subsystem(dev), "block") == 0) mode |= S_IFBLK; @@ -373,7 +372,7 @@ int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)), mode, uid, gid); - if (udev_node_mknod(dev, NULL, makedev(0,0), mode, uid, gid) != 0) { + if (udev_node_mknod(dev, NULL, mode, uid, gid) != 0) { err = -1; goto exit; } diff --git a/udev/udev.h b/udev/udev.h index 2b9bbecc..b1b65c56 100644 --- a/udev/udev.h +++ b/udev/udev.h @@ -81,7 +81,7 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev); struct udev_device *udev_watch_lookup(struct udev *udev, int wd); /* udev-node.c */ -int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mode_t mode, uid_t uid, gid_t gid); +int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_t uid, gid_t gid); int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid); int udev_node_remove(struct udev_device *dev); void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old);