Skip to content

Commit cfcf832

Browse files
zhchgbjbgoglin
authored andcommitted
fix#676 use hwloc_access instead of hwloc_accessat
(cherry picked from commit 9a503a2)
1 parent 6cd4cdb commit cfcf832

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hwloc/topology-linux.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2287,17 +2287,17 @@ hwloc_find_linux_cgroup_mntpnt(enum hwloc_linux_cgroup_type_e *cgtype, char **mn
22872287
size_t bufsize;
22882288

22892289
/* try standard mount points */
2290-
if (!hwloc_accessat("/sys/fs/cgroup/cpuset.cpus.effective", R_OK, fsroot_fd)) {
2290+
if (!hwloc_access("/sys/fs/cgroup/cpuset.cpus.effective", R_OK, fsroot_fd)) {
22912291
hwloc_debug("Found standard cgroup2/cpuset mount point at /sys/fs/cgroup/\n");
22922292
*cgtype = HWLOC_LINUX_CGROUP2;
22932293
*mntpnt = strdup("/sys/fs/cgroup");
22942294
return;
2295-
} else if (!hwloc_accessat("/sys/fs/cgroup/cpuset/cpuset.cpus", R_OK, fsroot_fd)) {
2295+
} else if (!hwloc_access("/sys/fs/cgroup/cpuset/cpuset.cpus", R_OK, fsroot_fd)) {
22962296
hwloc_debug("Found standard cgroup1/cpuset mount point at /sys/fs/cgroup/cpuset/\n");
22972297
*cgtype = HWLOC_LINUX_CGROUP1;
22982298
*mntpnt = strdup("/sys/fs/cgroup/cpuset");
22992299
return;
2300-
} else if (!hwloc_accessat("/dev/cpuset/cpus", R_OK, fsroot_fd)) {
2300+
} else if (!hwloc_access("/dev/cpuset/cpus", R_OK, fsroot_fd)) {
23012301
hwloc_debug("Found standard cpuset mount point at /dev/cpuset/\n");
23022302
*cgtype = HWLOC_LINUX_CPUSET;
23032303
*mntpnt = strdup("/dev/cpuset");

0 commit comments

Comments
 (0)