984f77
From 100324ef0d911913e09db71e030a5ba137ac357e Mon Sep 17 00:00:00 2001
984f77
From: Yu Watanabe <watanabe.yu+github@gmail.com>
984f77
Date: Wed, 7 Apr 2021 19:19:45 +0900
984f77
Subject: [PATCH] udev: it is not necessary that the path is readable
984f77
984f77
Related: #1939914
984f77
984f77
(cherry picked from commit 70c35e4bfd64f24c7cb3536bdf63af537e0f2971)
984f77
---
984f77
 src/udev/udev-builtin-net_id.c | 2 +-
984f77
 1 file changed, 1 insertion(+), 1 deletion(-)
984f77
984f77
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
984f77
index 816661fb93..ba7638fcb8 100644
984f77
--- a/src/udev/udev-builtin-net_id.c
984f77
+++ b/src/udev/udev-builtin-net_id.c
984f77
@@ -502,7 +502,7 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
984f77
 
984f77
                                 if (safe_atoi(attr, &function_id) >= 0 &&
984f77
                                     asprintf(&str, "%s/%08x/", slots, function_id) >= 0 &&
984f77
-                                    access(str, R_OK) == 0) {
984f77
+                                    access(str, F_OK) == 0) {
984f77
                                         hotplug_slot = function_id;
984f77
                                         domain = 0;
984f77
                                 } else