Home
last modified time | relevance | path

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

12

/openbmc/linux/arch/sparc/kernel/
H A Dsys_sparc32.c65 struct compat_stat64 __user *statbuf) in cp_compat_stat64() argument
69 err = put_user(huge_encode_dev(stat->dev), &statbuf->st_dev); in cp_compat_stat64()
70 err |= put_user(stat->ino, &statbuf->st_ino); in cp_compat_stat64()
71 err |= put_user(stat->mode, &statbuf->st_mode); in cp_compat_stat64()
72 err |= put_user(stat->nlink, &statbuf->st_nlink); in cp_compat_stat64()
73 err |= put_user(from_kuid_munged(current_user_ns(), stat->uid), &statbuf->st_uid); in cp_compat_stat64()
74 err |= put_user(from_kgid_munged(current_user_ns(), stat->gid), &statbuf->st_gid); in cp_compat_stat64()
75 err |= put_user(huge_encode_dev(stat->rdev), &statbuf->st_rdev); in cp_compat_stat64()
76 err |= put_user(0, (unsigned long __user *) &statbuf->__pad3[0]); in cp_compat_stat64()
77 err |= put_user(stat->size, &statbuf->st_size); in cp_compat_stat64()
[all …]
H A Dsystbls.h60 struct compat_stat64 __user *statbuf);
62 struct compat_stat64 __user *statbuf);
64 struct compat_stat64 __user * statbuf);
67 struct compat_stat64 __user * statbuf, int flag);
97 struct compat_stat64 __user * statbuf);
100 struct compat_stat64 __user * statbuf,
/openbmc/linux/fs/
H A Dstat.c311 static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * statbuf) in cp_old_stat() argument
345 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; in cp_old_stat()
349 struct __old_kernel_stat __user *, statbuf) in SYSCALL_DEFINE2() argument
358 return cp_old_stat(&stat, statbuf); in SYSCALL_DEFINE2()
362 struct __old_kernel_stat __user *, statbuf) in SYSCALL_DEFINE2() argument
371 return cp_old_stat(&stat, statbuf); in SYSCALL_DEFINE2()
374 SYSCALL_DEFINE2(fstat, unsigned int, fd, struct __old_kernel_stat __user *, statbuf) in SYSCALL_DEFINE2() argument
380 error = cp_old_stat(&stat, statbuf); in SYSCALL_DEFINE2()
393 static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf) in cp_new_stat() argument
429 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; in cp_new_stat()
[all …]
/openbmc/linux/tools/power/cpupower/utils/helpers/
H A 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()
/openbmc/linux/tools/power/cpupower/lib/
H A Dcpuidle.c34 struct stat statbuf; in cpuidle_state_file_exists() local
39 if (stat(path, &statbuf) != 0) in cpuidle_state_file_exists()
287 struct stat statbuf; in cpuidle_state_count() local
292 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) in cpuidle_state_count()
296 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) in cpuidle_state_count()
299 while (stat(file, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) { in cpuidle_state_count()
H A 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()
H A 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()
/openbmc/linux/tools/testing/selftests/splice/
H A 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()
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A 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()
H A Dlink_pinning.c15 struct stat statbuf = {}; in test_link_pinning_subtest() local
36 err = stat(link_pin_path, &statbuf); in test_link_pinning_subtest()
/openbmc/linux/arch/x86/kernel/
H A Dsys_ia32.c165 struct stat64 __user *, statbuf) in COMPAT_SYSCALL_DEFINE2() argument
171 ret = cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE2()
176 struct stat64 __user *, statbuf) in COMPAT_SYSCALL_DEFINE2() argument
181 ret = cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE2()
186 struct stat64 __user *, statbuf) in COMPAT_SYSCALL_DEFINE2() argument
191 ret = cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE2()
197 struct stat64 __user *, statbuf, int, flag) in COMPAT_SYSCALL_DEFINE4() argument
205 return cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE4()
/openbmc/linux/arch/s390/kernel/
H A Dcompat_linux.c150 …_SYSCALL_DEFINE2(s390_stat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf) in COMPAT_SYSCALL_DEFINE2() argument
155 ret = cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE2()
159 …SYSCALL_DEFINE2(s390_lstat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf) in COMPAT_SYSCALL_DEFINE2() argument
164 ret = cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE2()
168 COMPAT_SYSCALL_DEFINE2(s390_fstat64, unsigned int, fd, struct stat64_emu31 __user *, statbuf) in COMPAT_SYSCALL_DEFINE2() argument
173 ret = cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE2()
178 struct stat64_emu31 __user *, statbuf, int, flag) in COMPAT_SYSCALL_DEFINE4() argument
186 return cp_stat64(statbuf, &stat); in COMPAT_SYSCALL_DEFINE4()
H A Dcompat_linux.h86 long compat_sys_s390_stat64(const char __user *filename, struct stat64_emu31 __user *statbuf);
87 long compat_sys_s390_lstat64(const char __user *filename, struct stat64_emu31 __user *statbuf);
88 long compat_sys_s390_fstat64(unsigned int fd, struct stat64_emu31 __user *statbuf);
89 …at64(unsigned int dfd, const char __user *filename, struct stat64_emu31 __user *statbuf, int flag);
/openbmc/linux/arch/arm/include/asm/
H A Dsyscalls.h16 struct oldabi_stat64 __user * statbuf);
18 struct oldabi_stat64 __user * statbuf);
20 struct oldabi_stat64 __user * statbuf);
23 struct oldabi_stat64 __user *statbuf,
/openbmc/qemu/block/export/
H A Dfuse.c360 struct stat statbuf; in is_regular_file() local
363 ret = stat(path, &statbuf); in is_regular_file()
369 if (!S_ISREG(statbuf.st_mode)) { in is_regular_file()
409 struct stat statbuf; in fuse_getattr() local
427 statbuf = (struct stat) { in fuse_getattr()
441 fuse_reply_attr(req, &statbuf, 1.); in fuse_getattr()
496 static void fuse_setattr(fuse_req_t req, fuse_ino_t inode, struct stat *statbuf, in fuse_setattr() argument
520 (statbuf->st_mode & (S_IRWXG | S_IRWXO)) != 0) in fuse_setattr()
528 (statbuf->st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) != 0) in fuse_setattr()
541 ret = fuse_do_truncate(exp, statbuf->st_size, true, PREALLOC_MODE_OFF); in fuse_setattr()
[all …]
/openbmc/linux/arch/arm/kernel/
H A Dsys_oabi-compat.c122 struct oldabi_stat64 __user *statbuf) in cp_oldabi_stat64() argument
145 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; in cp_oldabi_stat64()
149 struct oldabi_stat64 __user * statbuf) in sys_oabi_stat64() argument
154 error = cp_oldabi_stat64(&stat, statbuf); in sys_oabi_stat64()
159 struct oldabi_stat64 __user * statbuf) in sys_oabi_lstat64() argument
164 error = cp_oldabi_stat64(&stat, statbuf); in sys_oabi_lstat64()
169 struct oldabi_stat64 __user * statbuf) in sys_oabi_fstat64() argument
174 error = cp_oldabi_stat64(&stat, statbuf); in sys_oabi_fstat64()
180 struct oldabi_stat64 __user *statbuf, in sys_oabi_fstatat64() argument
189 return cp_oldabi_stat64(&stat, statbuf); in sys_oabi_fstatat64()
/openbmc/qemu/migration/
H A Dfd.c30 struct stat statbuf; in fd_is_pipe() local
32 if (fstat(fd, &statbuf) == -1) { in fd_is_pipe()
36 return S_ISFIFO(statbuf.st_mode); in fd_is_pipe()
/openbmc/qemu/qga/
H A Dcommands-bsd.c36 struct stat statbuf; in build_fs_mount_list() local
47 ret = stat(mntp->f_mntonname, &statbuf); in build_fs_mount_list()
61 mount->dev = statbuf.st_dev; in build_fs_mount_list()
/openbmc/u-boot/scripts/dtc/
H A Ddtc.c138 struct stat statbuf; in guess_input_format() local
142 if (stat(fname, &statbuf) != 0) in guess_input_format()
145 if (S_ISDIR(statbuf.st_mode)) in guess_input_format()
148 if (!S_ISREG(statbuf.st_mode)) in guess_input_format()
/openbmc/linux/scripts/dtc/
H A Ddtc.c134 struct stat statbuf; in guess_input_format() local
138 if (stat(fname, &statbuf) != 0) in guess_input_format()
141 if (S_ISDIR(statbuf.st_mode)) in guess_input_format()
144 if (!S_ISREG(statbuf.st_mode)) in guess_input_format()
/openbmc/linux/tools/perf/util/
H A 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()
/openbmc/libpldm/src/requester/
H A Dinstance-id.c38 struct stat statbuf; in pldm_instance_db_init() local
51 rc = stat(dbpath, &statbuf); in pldm_instance_db_init()
56 if (statbuf.st_size < in pldm_instance_db_init()
/openbmc/hiomapd/file/
H A Dbackend.c50 struct stat statbuf; in file_dev_init() local
79 rc = fstat(priv->fd, &statbuf); in file_dev_init()
87 backend->flash_size = statbuf.st_size; in file_dev_init()
/openbmc/linux/samples/landlock/
H A Dsandboxer.c120 struct stat statbuf; in populate_ruleset() local
128 if (fstat(path_beneath.parent_fd, &statbuf)) { in populate_ruleset()
133 if (!S_ISDIR(statbuf.st_mode)) in populate_ruleset()
/openbmc/linux/fs/xfs/scrub/
H A Dxfile.c298 struct xfile_stat *statbuf) in xfile_stat() argument
308 statbuf->size = ks.size; in xfile_stat()
309 statbuf->bytes = ks.blocks << SECTOR_SHIFT; in xfile_stat()

12