tag | line | file | source code |
fd | 1454 | drivers/char/tty_io.c | filp = (*p)->files->fd[i]; |
fd | 355 | drivers/sound/configure.c | int fd; |
fd | 360 | drivers/sound/configure.c | if ((fd = open (path, 0)) > 0) |
fd | 368 | drivers/sound/configure.c | count = read (fd, &c, 1); |
fd | 379 | drivers/sound/configure.c | close (fd); |
fd | 236 | fs/buffer.c | asmlinkage int sys_fsync(unsigned int fd) |
fd | 241 | fs/buffer.c | if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode)) |
fd | 51 | fs/exec.c | asmlinkage int sys_close(unsigned fd); |
fd | 58 | fs/exec.c | static int load_aout_library(int fd); |
fd | 103 | fs/exec.c | int error, fd; |
fd | 111 | fs/exec.c | fd = 0; |
fd | 112 | fs/exec.c | fpp = current->files->fd; |
fd | 116 | fs/exec.c | if (++fd > NR_OPEN) |
fd | 136 | fs/exec.c | return fd; |
fd | 285 | fs/exec.c | int fd, retval; |
fd | 289 | fs/exec.c | fd = sys_open(library, 0, 0); |
fd | 290 | fs/exec.c | if (fd < 0) |
fd | 291 | fs/exec.c | return fd; |
fd | 292 | fs/exec.c | file = current->files->fd[fd]; |
fd | 299 | fs/exec.c | retval = fn(fd); |
fd | 304 | fs/exec.c | sys_close(fd); |
fd | 789 | fs/exec.c | int fd, error; |
fd | 836 | fs/exec.c | fd = open_inode(bprm->inode, O_RDONLY); |
fd | 838 | fs/exec.c | if (fd < 0) |
fd | 839 | fs/exec.c | return fd; |
fd | 840 | fs/exec.c | file = current->files->fd[fd]; |
fd | 842 | fs/exec.c | sys_close(fd); |
fd | 857 | fs/exec.c | sys_close(fd); |
fd | 866 | fs/exec.c | sys_close(fd); |
fd | 902 | fs/exec.c | static int load_aout_library(int fd) |
fd | 912 | fs/exec.c | file = current->files->fd[fd]; |
fd | 20 | fs/fcntl.c | static int dupfd(unsigned int fd, unsigned int arg) |
fd | 22 | fs/fcntl.c | if (fd >= NR_OPEN || !current->files->fd[fd]) |
fd | 27 | fs/fcntl.c | if (current->files->fd[arg]) |
fd | 34 | fs/fcntl.c | (current->files->fd[arg] = current->files->fd[fd])->f_count++; |
fd | 40 | fs/fcntl.c | if (oldfd >= NR_OPEN || !current->files->fd[oldfd]) |
fd | 66 | fs/fcntl.c | asmlinkage int sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) |
fd | 70 | fs/fcntl.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
fd | 74 | fs/fcntl.c | return dupfd(fd,arg); |
fd | 76 | fs/fcntl.c | return FD_ISSET(fd, ¤t->files->close_on_exec); |
fd | 79 | fs/fcntl.c | FD_SET(fd, ¤t->files->close_on_exec); |
fd | 81 | fs/fcntl.c | FD_CLR(fd, ¤t->files->close_on_exec); |
fd | 97 | fs/fcntl.c | return fcntl_getlk(fd, (struct flock *) arg); |
fd | 99 | fs/fcntl.c | return fcntl_setlk(fd, cmd, (struct flock *) arg); |
fd | 101 | fs/fcntl.c | return fcntl_setlk(fd, cmd, (struct flock *) arg); |
fd | 57 | fs/ioctl.c | asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) |
fd | 62 | fs/ioctl.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
fd | 66 | fs/ioctl.c | FD_SET(fd, ¤t->files->close_on_exec); |
fd | 70 | fs/ioctl.c | FD_CLR(fd, ¤t->files->close_on_exec); |
fd | 26 | fs/locks.c | unsigned int fd); |
fd | 29 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller, unsigned int fd); |
fd | 31 | fs/locks.c | unsigned int fd); |
fd | 54 | fs/locks.c | int fcntl_getlk(unsigned int fd, struct flock *l) |
fd | 61 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
fd | 69 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock, fd)) |
fd | 94 | fs/locks.c | int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l) |
fd | 105 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) |
fd | 111 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock, fd)) |
fd | 166 | fs/locks.c | return lock_it(filp, &file_lock, fd); |
fd | 174 | fs/locks.c | unsigned int fd) |
fd | 182 | fs/locks.c | while ((fl = *before) && (task != fl->fl_owner || fd != fl->fl_fd)) |
fd | 187 | fs/locks.c | while ((fl = *before) && task == fl->fl_owner && fd == fl->fl_fd) |
fd | 197 | fs/locks.c | unsigned int fd) |
fd | 220 | fs/locks.c | fl->fl_fd = fd; |
fd | 270 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller, unsigned int fd) |
fd | 380 | fs/locks.c | if (! (caller = alloc_lock(before, caller, fd))) |
fd | 390 | fs/locks.c | if (! (left = alloc_lock(before, right, fd))) { |
fd | 409 | fs/locks.c | unsigned int fd) |
fd | 428 | fs/locks.c | tmp->fl_fd = fd; /* FIXME: needed? */ |
fd | 21 | fs/nfs/inode.c | extern int close_fp(struct file *filp, unsigned int fd); |
fd | 66 | fs/nfs/inode.c | unsigned int fd; |
fd | 75 | fs/nfs/inode.c | fd = data->fd; |
fd | 80 | fs/nfs/inode.c | if (fd >= NR_OPEN || !(filp = current->files->fd[fd])) { |
fd | 22 | fs/open.c | extern void fcntl_remove_locks(struct task_struct *, struct file *, unsigned int fd); |
fd | 49 | fs/open.c | asmlinkage int sys_fstatfs(unsigned int fd, struct statfs * buf) |
fd | 58 | fs/open.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd])) |
fd | 94 | fs/open.c | asmlinkage int sys_ftruncate(unsigned int fd, unsigned int length) |
fd | 99 | fs/open.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd])) |
fd | 213 | fs/open.c | asmlinkage int sys_fchdir(unsigned int fd) |
fd | 218 | fs/open.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd])) |
fd | 253 | fs/open.c | asmlinkage int sys_fchmod(unsigned int fd, mode_t mode) |
fd | 258 | fs/open.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd])) |
fd | 304 | fs/open.c | asmlinkage int sys_fchown(unsigned int fd, uid_t user, gid_t group) |
fd | 309 | fs/open.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd])) |
fd | 380 | fs/open.c | int flag,error,fd; |
fd | 382 | fs/open.c | for(fd=0 ; fd<NR_OPEN ; fd++) |
fd | 383 | fs/open.c | if (!current->files->fd[fd]) |
fd | 385 | fs/open.c | if (fd>=NR_OPEN) |
fd | 387 | fs/open.c | FD_CLR(fd,¤t->files->close_on_exec); |
fd | 391 | fs/open.c | current->files->fd[fd] = f; |
fd | 400 | fs/open.c | current->files->fd[fd]=NULL; |
fd | 416 | fs/open.c | current->files->fd[fd]=NULL; |
fd | 421 | fs/open.c | return (fd); |
fd | 442 | fs/open.c | int close_fp(struct file *filp, unsigned int fd) |
fd | 452 | fs/open.c | fcntl_remove_locks(current, filp, fd); |
fd | 465 | fs/open.c | asmlinkage int sys_close(unsigned int fd) |
fd | 469 | fs/open.c | if (fd >= NR_OPEN) |
fd | 471 | fs/open.c | FD_CLR(fd, ¤t->files->close_on_exec); |
fd | 472 | fs/open.c | if (!(filp = current->files->fd[fd])) |
fd | 474 | fs/open.c | current->files->fd[fd] = NULL; |
fd | 475 | fs/open.c | return (close_fp (filp, fd)); |
fd | 382 | fs/pipe.c | int fd[2]; |
fd | 397 | fs/pipe.c | if (!current->files->fd[i]) { |
fd | 398 | fs/pipe.c | current->files->fd[ fd[j]=i ] = f[j]; |
fd | 402 | fs/pipe.c | current->files->fd[fd[0]]=NULL; |
fd | 409 | fs/pipe.c | current->files->fd[fd[0]] = NULL; |
fd | 410 | fs/pipe.c | current->files->fd[fd[1]] = NULL; |
fd | 423 | fs/pipe.c | put_fs_long(fd[0],0+fildes); |
fd | 424 | fs/pipe.c | put_fs_long(fd[1],1+fildes); |
fd | 56 | fs/proc/fd.c | unsigned int ino, pid, fd, c; |
fd | 87 | fs/proc/fd.c | fd = 0; |
fd | 92 | fs/proc/fd.c | fd = 0xfffff; |
fd | 95 | fs/proc/fd.c | fd *= 10; |
fd | 96 | fs/proc/fd.c | fd += c; |
fd | 97 | fs/proc/fd.c | if (fd & 0xffff0000) { |
fd | 98 | fs/proc/fd.c | fd = 0xfffff; |
fd | 108 | fs/proc/fd.c | if (fd >= NR_OPEN || !p->files->fd[fd] || !p->files->fd[fd]->f_inode) |
fd | 110 | fs/proc/fd.c | ino = (pid << 16) + 0x100 + fd; |
fd | 117 | fs/proc/fd.c | if (fd >= j) |
fd | 119 | fs/proc/fd.c | ino = (pid << 16) + 0x200 + fd; |
fd | 130 | fs/proc/fd.c | unsigned int fd, pid, ino; |
fd | 142 | fs/proc/fd.c | fd = filp->f_pos; |
fd | 144 | fs/proc/fd.c | if (fd < 2) { |
fd | 145 | fs/proc/fd.c | i = j = fd+1; |
fd | 146 | fs/proc/fd.c | if (!fd) |
fd | 147 | fs/proc/fd.c | fd = inode->i_ino; |
fd | 149 | fs/proc/fd.c | fd = (inode->i_ino & 0xffff0000) | 2; |
fd | 150 | fs/proc/fd.c | put_fs_long(fd, &dirent->d_ino); |
fd | 157 | fs/proc/fd.c | fd -= 2; |
fd | 164 | fs/proc/fd.c | if (fd >= NR_OPEN) |
fd | 166 | fs/proc/fd.c | if (!p->files->fd[fd] || !p->files->fd[fd]->f_inode) |
fd | 174 | fs/proc/fd.c | if (fd >= j) |
fd | 179 | fs/proc/fd.c | while (fd >= j) { |
fd | 185 | fs/proc/fd.c | ino = (pid << 16) + 0x100 + fd; |
fd | 187 | fs/proc/fd.c | ino = (pid << 16) + 0x200 + fd; |
fd | 192 | fs/proc/fd.c | put_fs_byte('0'+(fd % 10), i+dirent->d_name); |
fd | 193 | fs/proc/fd.c | fd /= 10; |
fd | 172 | fs/proc/inode.c | if (ino >= NR_OPEN || !p->files->fd[ino]) |
fd | 81 | fs/proc/link.c | if (ino < NR_OPEN && p->files->fd[ino]) |
fd | 82 | fs/proc/link.c | inode = p->files->fd[ino]->f_inode; |
fd | 19 | fs/read_write.c | asmlinkage int sys_readdir(unsigned int fd, struct dirent * dirent, unsigned int count) |
fd | 25 | fs/read_write.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd]) || |
fd | 37 | fs/read_write.c | asmlinkage int sys_lseek(unsigned int fd, off_t offset, unsigned int origin) |
fd | 42 | fs/read_write.c | if (fd >= NR_OPEN || !(file=current->files->fd[fd]) || !(file->f_inode)) |
fd | 70 | fs/read_write.c | asmlinkage int sys_read(unsigned int fd,char * buf,unsigned int count) |
fd | 76 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode)) |
fd | 90 | fs/read_write.c | asmlinkage int sys_write(unsigned int fd,char * buf,unsigned int count) |
fd | 96 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode)) |
fd | 104 | fs/select.c | if (!current->files->fd[i]) |
fd | 106 | fs/select.c | if (!current->files->fd[i]->f_inode) |
fd | 125 | fs/select.c | if (FD_ISSET(i,in) && check(SEL_IN,wait,current->files->fd[i])) { |
fd | 130 | fs/select.c | if (FD_ISSET(i,out) && check(SEL_OUT,wait,current->files->fd[i])) { |
fd | 135 | fs/select.c | if (FD_ISSET(i,ex) && check(SEL_EX,wait,current->files->fd[i])) { |
fd | 155 | fs/stat.c | asmlinkage int sys_fstat(unsigned int fd, struct old_stat * statbuf) |
fd | 164 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->files->fd[fd]) || !(inode=f->f_inode)) |
fd | 170 | fs/stat.c | asmlinkage int sys_newfstat(unsigned int fd, struct new_stat * statbuf) |
fd | 179 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->files->fd[fd]) || !(inode=f->f_inode)) |
fd | 34 | ibcs/binfmt_coff.c | asmlinkage int sys_close (unsigned fd); |
fd | 125 | ibcs/binfmt_coff.c | int fd = -1; /* Open file descriptor */ |
fd | 379 | ibcs/binfmt_coff.c | fd = open_inode (bprm->inode, O_RDONLY); |
fd | 380 | ibcs/binfmt_coff.c | if (fd < 0) { |
fd | 382 | ibcs/binfmt_coff.c | printk ("can not open inode, result = %d\n", fd); |
fd | 384 | ibcs/binfmt_coff.c | status = fd; |
fd | 387 | ibcs/binfmt_coff.c | fp = current->files->fd[fd]; |
fd | 390 | ibcs/binfmt_coff.c | fd = -1; /* Invalidate the open file descriptor */ |
fd | 568 | ibcs/binfmt_coff.c | if (fd >= 0) |
fd | 569 | ibcs/binfmt_coff.c | sys_close (fd); /* Close unused code file */ |
fd | 737 | ibcs/binfmt_coff.c | load_coff_library (int fd) |
fd | 759 | ibcs/binfmt_coff.c | file = current->files->fd[fd]; |
fd | 29 | ibcs/binfmt_elf.c | asmlinkage int sys_close(unsigned fd); |
fd | 172 | ibcs/binfmt_elf.c | file = current->files->fd[elf_exec_fileno]; |
fd | 329 | ibcs/binfmt_elf.c | file = current->files->fd[elf_exec_fileno]; |
fd | 565 | ibcs/binfmt_elf.c | static int load_elf_library(int fd){ |
fd | 578 | ibcs/binfmt_elf.c | file = current->files->fd[fd]; |
fd | 584 | ibcs/binfmt_elf.c | sys_close(fd); |
fd | 637 | ibcs/binfmt_elf.c | sys_close(fd); |
fd | 35 | include/linux/binfmts.h | int (*load_shlib)(int fd); |
fd | 24 | include/linux/nfs_mount.h | int fd; /* 1 */ |
fd | 196 | include/linux/sched.h | struct file * fd[NR_OPEN]; |
fd | 17 | include/linux/time.h | #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp) |
fd | 18 | include/linux/time.h | #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp) |
fd | 19 | include/linux/time.h | #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp) |
fd | 95 | include/linux/types.h | #define __FD_SET(fd,fdsetp) \ |
fd | 97 | include/linux/types.h | "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd))) |
fd | 100 | include/linux/types.h | #define __FD_CLR(fd,fdsetp) \ |
fd | 102 | include/linux/types.h | "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd))) |
fd | 105 | include/linux/types.h | #define __FD_ISSET(fd,fdsetp) (__extension__ ({ \ |
fd | 108 | include/linux/types.h | :"=q" (__result) :"r" ((int) (fd)), \ |
fd | 53 | init/main.c | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) |
fd | 54 | init/main.c | static inline _syscall1(int,dup,int,fd) |
fd | 57 | init/main.c | static inline _syscall1(int,close,int,fd) |
fd | 393 | kernel/exit.c | if (current->files->fd[i]) |
fd | 123 | kernel/fork.c | if ((f = p->files->fd[i]) != NULL) |
fd | 124 | kernel/fork.c | p->files->fd[i] = copy_fd(f); |
fd | 127 | kernel/fork.c | if ((f = p->files->fd[i]) != NULL) |
fd | 10 | lib/close.c | _syscall1(int,close,int,fd) |
fd | 10 | lib/dup.c | _syscall1(int,dup,int,fd) |
fd | 11 | lib/write.c | _syscall3(int,write,int,fd,const char *,buf,off_t,count) |
fd | 148 | mm/mmap.c | unsigned long fd = get_fs_long(buffer+4); |
fd | 149 | mm/mmap.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd])) |
fd | 148 | net/socket.c | int fd; |
fd | 159 | net/socket.c | for (fd = 0; fd < NR_OPEN; ++fd) |
fd | 160 | net/socket.c | if (!current->files->fd[fd]) |
fd | 162 | net/socket.c | if (fd == NR_OPEN) |
fd | 168 | net/socket.c | FD_CLR(fd, ¤t->files->close_on_exec); |
fd | 169 | net/socket.c | current->files->fd[fd] = file; |
fd | 178 | net/socket.c | return(fd); |
fd | 188 | net/socket.c | static inline void toss_fd(int fd) |
fd | 190 | net/socket.c | sys_close(fd); /* the count protects us from iput */ |
fd | 220 | net/socket.c | static inline struct socket *sockfd_lookup(int fd, struct file **pfile) |
fd | 224 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->files->fd[fd])) |
fd | 568 | net/socket.c | int i, fd; |
fd | 618 | net/socket.c | if ((fd = get_fd(SOCK_INODE(sock))) < 0) |
fd | 624 | net/socket.c | return(fd); |
fd | 692 | net/socket.c | static int sock_bind(int fd, struct sockaddr *umyaddr, int addrlen) |
fd | 699 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->files->fd[fd] == NULL) |
fd | 702 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 722 | net/socket.c | static int sock_listen(int fd, int backlog) |
fd | 726 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->files->fd[fd] == NULL) |
fd | 728 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 751 | net/socket.c | static int sock_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen) |
fd | 759 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 761 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) |
fd | 792 | net/socket.c | if ((fd = get_fd(SOCK_INODE(newsock))) < 0) |
fd | 803 | net/socket.c | return(fd); |
fd | 812 | net/socket.c | static int sock_connect(int fd, struct sockaddr *uservaddr, int addrlen) |
fd | 820 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || (file=current->files->fd[fd]) == NULL) |
fd | 822 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) |
fd | 864 | net/socket.c | static int sock_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 871 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->files->fd[fd] == NULL) |
fd | 873 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 889 | net/socket.c | static int sock_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 896 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->files->fd[fd] == NULL) |
fd | 898 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 914 | net/socket.c | static int sock_send(int fd, void * buff, int len, unsigned flags) |
fd | 920 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 922 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 941 | net/socket.c | static int sock_sendto(int fd, void * buff, int len, unsigned flags, |
fd | 949 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 951 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 978 | net/socket.c | static int sock_recv(int fd, void * buff, int len, unsigned flags) |
fd | 984 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 987 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 1007 | net/socket.c | static int sock_recvfrom(int fd, void * buff, int len, unsigned flags, |
fd | 1015 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 1017 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 1044 | net/socket.c | static int sock_setsockopt(int fd, int level, int optname, char *optval, int optlen) |
fd | 1049 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 1051 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 1062 | net/socket.c | static int sock_getsockopt(int fd, int level, int optname, char *optval, int *optlen) |
fd | 1067 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 1069 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 1082 | net/socket.c | static int sock_shutdown(int fd, int how) |
fd | 1087 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->files->fd[fd]) == NULL)) |
fd | 1089 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |