Home
last modified time | relevance | path

Searched refs:statbuf (Results 1 – 13 of 13) sorted by relevance

/tools/testing/selftests/splice/
Dsplice_read.c32 struct stat statbuf; in main() local
34 if (fstat(fd, &statbuf) < 0) { in main()
39 if (statbuf.st_size > INT_MAX) { in main()
44 size = statbuf.st_size; in main()
/tools/power/cpupower/utils/helpers/
Dsysfs.c55 struct stat statbuf; in sysfs_is_cpu_online() local
59 if (stat(path, &statbuf) != 0) in sysfs_is_cpu_online()
67 if (stat(path, &statbuf) != 0) in sysfs_is_cpu_online()
108 struct stat statbuf; in sysfs_idlestate_file_exists() local
113 if (stat(path, &statbuf) != 0) in sysfs_idlestate_file_exists()
357 struct stat statbuf; in sysfs_get_idlestate_count() local
362 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) in sysfs_get_idlestate_count()
366 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) in sysfs_get_idlestate_count()
369 while (stat(file, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) { in sysfs_get_idlestate_count()
/tools/power/cpupower/lib/
Dcpuidle.c34 struct stat statbuf; in cpuidle_state_file_exists() local
39 if (stat(path, &statbuf) != 0) in cpuidle_state_file_exists()
295 struct stat statbuf; in cpuidle_state_count() local
300 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) in cpuidle_state_count()
304 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) in cpuidle_state_count()
307 while (stat(file, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) { in cpuidle_state_count()
Dcpupower.c82 struct stat statbuf; in cpupower_is_cpu_online() local
86 if (stat(path, &statbuf) != 0) in cpupower_is_cpu_online()
94 if (stat(path, &statbuf) != 0) in cpupower_is_cpu_online()
Dpowercap.c97 struct stat statbuf; in powercap_get_driver() local
99 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) { in powercap_get_driver()
/tools/testing/selftests/bpf/prog_tests/
Dpinning.c37 struct stat statbuf = {}; in test_pinning() local
66 err = stat(pinpath, &statbuf); in test_pinning()
71 err = stat(nopinpath, &statbuf); in test_pinning()
77 err = stat(nopinpath2, &statbuf); in test_pinning()
152 err = stat(custpinpath, &statbuf); in test_pinning()
197 err = stat(nopinpath2, &statbuf); in test_pinning()
203 err = stat(pinpath, &statbuf); in test_pinning()
221 err = stat(custpinpath, &statbuf); in test_pinning()
266 err = stat(custpinpath, &statbuf); in test_pinning()
Dlink_pinning.c15 struct stat statbuf = {}; in test_link_pinning_subtest() local
36 err = stat(link_pin_path, &statbuf); in test_link_pinning_subtest()
/tools/perf/util/
Dutil.c157 struct stat statbuf; in rm_rf_depth_pat() local
160 ret = lstat(path, &statbuf); in rm_rf_depth_pat()
165 if (!(statbuf.st_mode & S_IFDIR)) in rm_rf_depth_pat()
187 ret = lstat(namebuf, &statbuf); in rm_rf_depth_pat()
193 if (S_ISDIR(statbuf.st_mode)) in rm_rf_depth_pat()
Dheader.c1004 struct stat statbuf; in is_cpu_online() local
1008 if (stat(buf, &statbuf) != 0) in is_cpu_online()
1020 if (stat(buf, &statbuf) != 0) in is_cpu_online()
/tools/power/cpupower/utils/
Dcpupower.c179 struct stat statbuf; in main() local
220 stat(pathname, &statbuf) != 0) { in main()
/tools/testing/selftests/resctrl/
Dresctrlfs.c714 struct stat statbuf; in resctrl_resource_exists() local
726 if (stat(res_path, &statbuf)) in resctrl_resource_exists()
772 struct stat statbuf; in resource_info_file_exists() local
780 if (stat(res_path, &statbuf)) in resource_info_file_exists()
/tools/testing/selftests/kvm/lib/
Dtest_util.c138 struct stat statbuf; in thp_configured() local
140 ret = stat("/sys/kernel/mm/transparent_hugepage", &statbuf); in thp_configured()
/tools/testing/selftests/landlock/
Dfs_test.c1964 struct stat statbuf; in copy_binary() local
1977 ASSERT_EQ(0, fstat(src_fd, &statbuf)); in copy_binary()
1978 ASSERT_EQ(statbuf.st_size, in copy_binary()
1979 sendfile(dst_fd, src_fd, 0, statbuf.st_size)); in copy_binary()
5208 struct stat statbuf; in FIXTURE_SETUP() local
5220 if (stat(dir_path, &statbuf)) { in FIXTURE_SETUP()
5232 if (stat(variant->file_path, &statbuf)) { in FIXTURE_SETUP()