diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /src/udev/udev-node.c | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/udev/udev-node.c')
-rw-r--r-- | src/udev/udev-node.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index e12c26c..633fb2a 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -510,22 +510,17 @@ static int link_update(sd_device *dev, const char *slink, bool add) { } static int device_get_devpath_by_devnum(sd_device *dev, char **ret) { - const char *subsystem; dev_t devnum; int r; assert(dev); assert(ret); - r = sd_device_get_subsystem(dev, &subsystem); - if (r < 0) - return r; - r = sd_device_get_devnum(dev, &devnum); if (r < 0) return r; - return device_path_make_major_minor(streq(subsystem, "block") ? S_IFBLK : S_IFCHR, devnum, ret); + return device_path_make_major_minor(device_in_subsystem(dev, "block") ? S_IFBLK : S_IFCHR, devnum, ret); } int udev_node_update(sd_device *dev, sd_device *dev_old) { |