Searched refs:statbuf (Results 1 - 25 of 26) sorted by relevance

12

/linux-master/tools/testing/selftests/splice/
H A Dsplice_read.c32 struct stat statbuf; local
34 if (fstat(fd, &statbuf) < 0) {
39 if (statbuf.st_size > INT_MAX) {
44 size = statbuf.st_size;
/linux-master/arch/sparc/kernel/
H A Dsys_sparc32.c65 struct compat_stat64 __user *statbuf)
69 err = put_user(huge_encode_dev(stat->dev), &statbuf->st_dev);
70 err |= put_user(stat->ino, &statbuf->st_ino);
71 err |= put_user(stat->mode, &statbuf->st_mode);
72 err |= put_user(stat->nlink, &statbuf->st_nlink);
73 err |= put_user(from_kuid_munged(current_user_ns(), stat->uid), &statbuf->st_uid);
74 err |= put_user(from_kgid_munged(current_user_ns(), stat->gid), &statbuf->st_gid);
75 err |= put_user(huge_encode_dev(stat->rdev), &statbuf->st_rdev);
76 err |= put_user(0, (unsigned long __user *) &statbuf->__pad3[0]);
77 err |= put_user(stat->size, &statbuf
64 cp_compat_stat64(struct kstat *stat, struct compat_stat64 __user *statbuf) argument
[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,
/linux-master/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,
/linux-master/tools/power/cpupower/utils/helpers/
H A Dsysfs.c55 struct stat statbuf; local
59 if (stat(path, &statbuf) != 0)
67 if (stat(path, &statbuf) != 0)
108 struct stat statbuf; local
113 if (stat(path, &statbuf) != 0)
357 struct stat statbuf; local
362 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode))
366 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf
[all...]
/linux-master/tools/power/cpupower/lib/
H A Dcpuidle.c34 struct stat statbuf; local
39 if (stat(path, &statbuf) != 0)
287 struct stat statbuf; local
292 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode))
296 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode))
299 while (stat(file, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) {
H A Dcpupower.c82 struct stat statbuf; local
86 if (stat(path, &statbuf) != 0)
94 if (stat(path, &statbuf) != 0)
H A Dpowercap.c89 struct stat statbuf; local
91 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) {
/linux-master/arch/s390/kernel/
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 long compat_sys_s390_fstatat64(unsigned int dfd, const char __user *filename, struct stat64_emu31 __user *statbuf, int flag);
H A Dcompat_linux.c150 COMPAT_SYSCALL_DEFINE2(s390_stat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf)
155 ret = cp_stat64(statbuf, &stat);
159 COMPAT_SYSCALL_DEFINE2(s390_lstat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf)
164 ret = cp_stat64(statbuf, &stat);
168 COMPAT_SYSCALL_DEFINE2(s390_fstat64, unsigned int, fd, struct stat64_emu31 __user *, statbuf)
173 ret = cp_stat64(statbuf, &stat);
178 struct stat64_emu31 __user *, statbuf, int, flag)
186 return cp_stat64(statbuf, &stat);
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dpinning.c37 struct stat statbuf = {}; local
66 err = stat(pinpath, &statbuf);
71 err = stat(nopinpath, &statbuf);
77 err = stat(nopinpath2, &statbuf);
152 err = stat(custpinpath, &statbuf);
197 err = stat(nopinpath2, &statbuf);
203 err = stat(pinpath, &statbuf);
221 err = stat(custpinpath, &statbuf);
266 err = stat(custpinpath, &statbuf);
H A Dlink_pinning.c15 struct stat statbuf = {}; local
36 err = stat(link_pin_path, &statbuf);
/linux-master/fs/
H A Dstat.c316 static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * statbuf) argument
350 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
354 struct __old_kernel_stat __user *, statbuf)
363 return cp_old_stat(&stat, statbuf);
367 struct __old_kernel_stat __user *, statbuf)
376 return cp_old_stat(&stat, statbuf);
379 SYSCALL_DEFINE2(fstat, unsigned int, fd, struct __old_kernel_stat __user *, statbuf)
385 error = cp_old_stat(&stat, statbuf);
398 static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf) argument
434 return copy_to_user(statbuf,
543 cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf) argument
[all...]
/linux-master/arch/x86/kernel/
H A Dsys_ia32.c165 struct stat64 __user *, statbuf)
171 ret = cp_stat64(statbuf, &stat);
176 struct stat64 __user *, statbuf)
181 ret = cp_stat64(statbuf, &stat);
186 struct stat64 __user *, statbuf)
191 ret = cp_stat64(statbuf, &stat);
197 struct stat64 __user *, statbuf, int, flag)
205 return cp_stat64(statbuf, &stat);
/linux-master/arch/arm/kernel/
H A Dsys_oabi-compat.c122 struct oldabi_stat64 __user *statbuf)
145 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
149 struct oldabi_stat64 __user * statbuf)
154 error = cp_oldabi_stat64(&stat, statbuf);
159 struct oldabi_stat64 __user * statbuf)
164 error = cp_oldabi_stat64(&stat, statbuf);
169 struct oldabi_stat64 __user * statbuf)
174 error = cp_oldabi_stat64(&stat, statbuf);
180 struct oldabi_stat64 __user *statbuf,
189 return cp_oldabi_stat64(&stat, statbuf);
121 cp_oldabi_stat64(struct kstat *stat, struct oldabi_stat64 __user *statbuf) argument
148 sys_oabi_stat64(const char __user * filename, struct oldabi_stat64 __user * statbuf) argument
158 sys_oabi_lstat64(const char __user * filename, struct oldabi_stat64 __user * statbuf) argument
168 sys_oabi_fstat64(unsigned long fd, struct oldabi_stat64 __user * statbuf) argument
178 sys_oabi_fstatat64(int dfd, const char __user *filename, struct oldabi_stat64 __user *statbuf, int flag) argument
[all...]
/linux-master/scripts/dtc/
H A Ddtc.c134 struct stat statbuf; local
138 if (stat(fname, &statbuf) != 0)
141 if (S_ISDIR(statbuf.st_mode))
144 if (!S_ISREG(statbuf.st_mode))
/linux-master/tools/power/cpupower/utils/
H A Dcpupower.c179 struct stat statbuf; local
220 stat(pathname, &statbuf) != 0) {
/linux-master/samples/landlock/
H A Dsandboxer.c118 struct stat statbuf; local
126 if (fstat(path_beneath.parent_fd, &statbuf)) {
133 if (!S_ISDIR(statbuf.st_mode))
/linux-master/tools/perf/util/
H A Dutil.c157 struct stat statbuf; local
160 ret = lstat(path, &statbuf);
165 if (!(statbuf.st_mode & S_IFDIR))
187 ret = lstat(namebuf, &statbuf);
193 if (S_ISDIR(statbuf.st_mode))
/linux-master/tools/testing/selftests/resctrl/
H A Dresctrlfs.c720 struct stat statbuf; local
732 if (stat(res_path, &statbuf))
778 struct stat statbuf; local
786 if (stat(res_path, &statbuf))
/linux-master/tools/testing/selftests/kvm/lib/
H A Dtest_util.c138 struct stat statbuf; local
140 ret = stat("/sys/kernel/mm/transparent_hugepage", &statbuf);
/linux-master/arch/um/drivers/
H A Dvector_user.c817 struct stat statbuf; local
823 if (stat(filename, &statbuf) < 0) {
832 bpf_prog->len = statbuf.st_size / sizeof(struct sock_filter);
839 bpf = uml_kmalloc(statbuf.st_size, UM_GFP_KERNEL);
845 res = os_read_file(ffd, bpf, statbuf.st_size);
846 if (res < statbuf.st_size) {
/linux-master/include/linux/
H A Dsyscalls.h503 struct stat __user *statbuf, int flag);
504 asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf);
506 asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf);
508 struct stat64 __user *statbuf, int flag);
1017 struct stat64 __user *statbuf);
1019 struct stat64 __user *statbuf);
1034 struct stat __user *statbuf);
1036 struct stat __user *statbuf);
1148 struct __old_kernel_stat __user *statbuf);
1150 struct __old_kernel_stat __user *statbuf);
[all...]
H A Dcompat.h666 struct compat_stat __user *statbuf,
669 struct compat_stat __user *statbuf);
822 struct compat_stat __user *statbuf);
824 struct compat_stat __user *statbuf);
/linux-master/tools/testing/selftests/landlock/
H A Dfs_test.c1957 struct stat statbuf; local
1970 ASSERT_EQ(0, fstat(src_fd, &statbuf));
1971 ASSERT_EQ(statbuf.st_size,
1972 sendfile(dst_fd, src_fd, 0, statbuf.st_size));
5165 struct stat statbuf; local
5177 if (stat(dir_path, &statbuf)) {
5189 if (stat(variant->file_path, &statbuf)) {

Completed in 418 milliseconds

12