Lines Matching refs:buf

80 	struct readdir_callback *buf =  in fillonedir()  local
85 if (buf->result) in fillonedir()
89 buf->result = -EOVERFLOW; in fillonedir()
92 buf->result++; in fillonedir()
93 dirent = buf->dirent; in fillonedir()
106 buf->result = -EFAULT; in fillonedir()
115 struct readdir_callback buf = { in SYSCALL_DEFINE3() local
123 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
124 if (buf.result) in SYSCALL_DEFINE3()
125 error = buf.result; in SYSCALL_DEFINE3()
156 struct getdents_callback *buf = in filldir() local
162 buf->error = -EINVAL; /* only used if we fail.. */ in filldir()
163 if (reclen > buf->count) in filldir()
167 buf->error = -EOVERFLOW; in filldir()
170 dirent = buf->previous; in filldir()
175 dirent = buf->current_dir; in filldir()
186 buf->previous = dirent; in filldir()
188 buf->current_dir = dirent; in filldir()
189 buf->count -= reclen; in filldir()
192 buf->error = -EFAULT; in filldir()
201 struct getdents_callback buf = { in SYSCALL_DEFINE3() local
215 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
217 error = buf.error; in SYSCALL_DEFINE3()
218 lastdirent = buf.previous; in SYSCALL_DEFINE3()
220 if (put_user(buf.ctx.pos, &lastdirent->d_off)) in SYSCALL_DEFINE3()
223 error = count - buf.count; in SYSCALL_DEFINE3()
241 struct getdents_callback64 *buf = in filldir64() local
246 buf->error = -EINVAL; /* only used if we fail.. */ in filldir64()
247 if (reclen > buf->count) in filldir64()
249 dirent = buf->previous; in filldir64()
254 dirent = buf->current_dir; in filldir64()
267 buf->previous = dirent; in filldir64()
269 buf->current_dir = dirent; in filldir64()
270 buf->count -= reclen; in filldir64()
273 buf->error = -EFAULT; in filldir64()
282 struct getdents_callback64 buf = { in SYSCALL_DEFINE3() local
296 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
298 error = buf.error; in SYSCALL_DEFINE3()
299 lastdirent = buf.previous; in SYSCALL_DEFINE3()
301 typeof(lastdirent->d_off) d_off = buf.ctx.pos; in SYSCALL_DEFINE3()
305 error = count - buf.count; in SYSCALL_DEFINE3()