]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: it is not necessary that the path is readable
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Apr 2021 10:19:45 +0000 (19:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Apr 2021 16:35:43 +0000 (01:35 +0900)
src/udev/udev-builtin-net_id.c

index 53653c492a827885994fa75eb0a25a2fb509030b..c6f2e6ddf5163e040851bd893010f1d33f9c30a4 100644 (file)
@@ -363,7 +363,7 @@ static int dev_pci_slot(sd_device *dev, struct netnames *names) {
 
                         if (safe_atoi(attr, &function_id) >= 0 &&
                             asprintf(&str, "%s/%08x/", slots, function_id) >= 0 &&
-                            access(str, R_OK) == 0) {
+                            access(str, F_OK) == 0) {
                                 hotplug_slot = function_id;
                                 domain = 0;
                         } else