Lines Matching defs:int
38 int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
41 int ret;
123 unsigned int lookup_flags = LOOKUP_FOLLOW;
125 int error;
155 long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
160 int error;
203 SYSCALL_DEFINE2(ftruncate, unsigned int, fd, off_t, length)
209 COMPAT_SYSCALL_DEFINE2(ftruncate, unsigned int, fd, compat_off_t, length)
222 SYSCALL_DEFINE2(ftruncate64, unsigned int, fd, loff_t, length)
229 int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
326 int ksys_fallocate(int fd, int mode, loff_t offset, loff_t len)
329 int error = -EBADF;
338 SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
397 static long do_faccessat(int dfd, const char __user *filename, int mode, int flags)
401 int res;
402 unsigned int lookup_flags = LOOKUP_FOLLOW;
469 SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
474 SYSCALL_DEFINE4(faccessat2, int, dfd, const char __user *, filename, int, mode,
475 int, flags)
480 SYSCALL_DEFINE2(access, const char __user *, filename, int, mode)
488 int error;
489 unsigned int lookup_flags = LOOKUP_FOLLOW | LOOKUP_DIRECTORY;
511 SYSCALL_DEFINE1(fchdir, unsigned int, fd)
514 int error;
536 int error;
537 unsigned int lookup_flags = LOOKUP_FOLLOW | LOOKUP_DIRECTORY;
566 int chmod_common(const struct path *path, umode_t mode)
571 int error;
595 int vfs_fchmod(struct file *file, umode_t mode)
601 SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode)
604 int err = -EBADF;
613 static int do_fchmodat(int dfd, const char __user *filename, umode_t mode)
616 int error;
617 unsigned int lookup_flags = LOOKUP_FOLLOW;
631 SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename,
642 int chown_common(const struct path *path, uid_t user, gid_t group)
646 int error;
684 int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group,
685 int flag)
688 int error = -EINVAL;
689 int lookup_flags;
716 SYSCALL_DEFINE5(fchownat, int, dfd, const char __user *, filename, uid_t, user,
717 gid_t, group, int, flag)
733 int vfs_fchown(struct file *file, uid_t user, gid_t group)
735 int error;
746 int ksys_fchown(unsigned int fd, uid_t user, gid_t group)
749 int error = -EBADF;
758 SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group)
763 static int do_dentry_open(struct file *f,
765 int (*open)(struct inode *, struct file *))
768 int error;
885 int finish_open(struct file *file, struct dentry *dentry,
886 int (*open)(struct inode *, struct file *))
909 int finish_no_open(struct file *file, struct dentry *dentry)
916 char *file_path(struct file *filp, char *buf, int buflen)
928 int vfs_open(const struct path *path, struct file *file)
934 struct file *dentry_open(const struct path *path, int flags,
937 int error;
957 struct file *open_with_fake_path(const struct path *path, int flags,
962 int error;
978 inline struct open_how build_open_how(int flags, umode_t mode)
994 inline int build_open_flags(const struct open_how *how, struct open_flags *op)
998 int lookup_flags = 0;
999 int acc_mode = ACC_MODE(flags);
1124 struct file *file_open_name(struct filename *name, int flags, umode_t mode)
1128 int err = build_open_flags(&how, &op);
1145 struct file *filp_open(const char *filename, int flags, umode_t mode)
1159 const char *filename, int flags, umode_t mode)
1163 int err = build_open_flags(&how, &op);
1170 static long do_sys_openat2(int dfd, const char __user *filename,
1174 int fd = build_open_flags(how, &op);
1199 long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
1206 SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
1213 SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags,
1221 SYSCALL_DEFINE4(openat2, int, dfd, const char __user *, filename,
1224 int err;
1249 COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
1258 COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode)
1272 int flags = O_CREAT | O_WRONLY | O_TRUNC;
1284 int filp_close(struct file *filp, fl_owner_t id)
1286 int retval = 0;
1311 SYSCALL_DEFINE1(close, unsigned int, fd)
1313 int retval = __close_fd(current->files, fd);
1336 SYSCALL_DEFINE3(close_range, unsigned int, fd, unsigned int, max_fd,
1337 unsigned int, flags)
1361 int generic_file_open(struct inode * inode, struct file * filp)
1373 * reason it returns an 'int' and not 'void' is so that it can be plugged
1376 int nonseekable_open(struct inode *inode, struct file *filp)
1391 * stream_open never fails and is marked to return int so that it could be
1394 int stream_open(struct inode *inode, struct file *filp)