tag | line | file | source code |
fd | 20 | fs/binfmt_elf.c | asmlinkage int sys_close(unsigned fd); |
fd | 337 | fs/binfmt_elf.c | int load_elf_library(int fd){ |
fd | 350 | fs/binfmt_elf.c | file = current->filp[fd]; |
fd | 356 | fs/binfmt_elf.c | sys_close(fd); |
fd | 409 | fs/binfmt_elf.c | sys_close(fd); |
fd | 177 | fs/buffer.c | asmlinkage int sys_fsync(unsigned int fd) |
fd | 182 | fs/buffer.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
fd | 50 | fs/exec.c | asmlinkage int sys_close(unsigned fd); |
fd | 58 | fs/exec.c | int error, fd; |
fd | 66 | fs/exec.c | fd = 0; |
fd | 71 | fs/exec.c | if (++fd > NR_OPEN) |
fd | 91 | fs/exec.c | return fd; |
fd | 236 | fs/exec.c | int fd, retval; |
fd | 240 | fs/exec.c | fd = sys_open(library, 0, 0); |
fd | 241 | fs/exec.c | if (fd < 0) |
fd | 242 | fs/exec.c | return fd; |
fd | 243 | fs/exec.c | file = current->filp[fd]; |
fd | 251 | fs/exec.c | retval = fn(fd); |
fd | 255 | fs/exec.c | sys_close(fd); |
fd | 724 | fs/exec.c | extern int load_aout_library(int fd); |
fd | 728 | fs/exec.c | extern int load_elf_library(int fd); |
fd | 748 | fs/exec.c | int fd, error; |
fd | 791 | fs/exec.c | fd = open_inode(bprm->inode, O_RDONLY); |
fd | 793 | fs/exec.c | if (fd < 0) |
fd | 794 | fs/exec.c | return fd; |
fd | 795 | fs/exec.c | file = current->filp[fd]; |
fd | 797 | fs/exec.c | sys_close(fd); |
fd | 810 | fs/exec.c | sys_close(fd); |
fd | 818 | fs/exec.c | sys_close(fd); |
fd | 841 | fs/exec.c | int load_aout_library(int fd) |
fd | 851 | fs/exec.c | file = current->filp[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->filp[fd]) |
fd | 34 | fs/fcntl.c | (current->filp[arg] = current->filp[fd])->f_count++; |
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->filp[fd])) |
fd | 74 | fs/fcntl.c | return dupfd(fd,arg); |
fd | 76 | fs/fcntl.c | return FD_ISSET(fd, ¤t->close_on_exec); |
fd | 79 | fs/fcntl.c | FD_SET(fd, ¤t->close_on_exec); |
fd | 81 | fs/fcntl.c | FD_CLR(fd, ¤t->close_on_exec); |
fd | 90 | fs/fcntl.c | return fcntl_getlk(fd, (struct flock *) arg); |
fd | 92 | fs/fcntl.c | return fcntl_setlk(fd, cmd, (struct flock *) arg); |
fd | 94 | 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->filp[fd])) |
fd | 66 | fs/ioctl.c | FD_SET(fd, ¤t->close_on_exec); |
fd | 70 | fs/ioctl.c | FD_CLR(fd, ¤t->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->filp[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->filp[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 | 222 | fs/locks.c | fl->fl_fd = fd; |
fd | 272 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller, unsigned int fd) |
fd | 382 | fs/locks.c | if (! (caller = alloc_lock(before, caller, fd))) |
fd | 392 | fs/locks.c | if (! (left = alloc_lock(before, right, fd))) { |
fd | 411 | fs/locks.c | unsigned int fd) |
fd | 430 | 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->filp[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->filp[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->filp[fd])) |
fd | 234 | fs/open.c | asmlinkage int sys_fchmod(unsigned int fd, mode_t mode) |
fd | 239 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 281 | fs/open.c | asmlinkage int sys_fchown(unsigned int fd, uid_t user, gid_t group) |
fd | 286 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 357 | fs/open.c | int flag,error,fd; |
fd | 359 | fs/open.c | for(fd=0 ; fd<NR_OPEN ; fd++) |
fd | 360 | fs/open.c | if (!current->filp[fd]) |
fd | 362 | fs/open.c | if (fd>=NR_OPEN) |
fd | 364 | fs/open.c | FD_CLR(fd,¤t->close_on_exec); |
fd | 368 | fs/open.c | current->filp[fd] = f; |
fd | 377 | fs/open.c | current->filp[fd]=NULL; |
fd | 393 | fs/open.c | current->filp[fd]=NULL; |
fd | 398 | fs/open.c | return (fd); |
fd | 419 | fs/open.c | int close_fp(struct file *filp, unsigned int fd) |
fd | 429 | fs/open.c | fcntl_remove_locks(current, filp, fd); |
fd | 442 | fs/open.c | asmlinkage int sys_close(unsigned int fd) |
fd | 446 | fs/open.c | if (fd >= NR_OPEN) |
fd | 448 | fs/open.c | FD_CLR(fd, ¤t->close_on_exec); |
fd | 449 | fs/open.c | if (!(filp = current->filp[fd])) |
fd | 451 | fs/open.c | current->filp[fd] = NULL; |
fd | 452 | fs/open.c | return (close_fp (filp, fd)); |
fd | 360 | fs/pipe.c | int fd[2]; |
fd | 376 | fs/pipe.c | current->filp[ fd[j]=i ] = f[j]; |
fd | 380 | fs/pipe.c | current->filp[fd[0]]=NULL; |
fd | 387 | fs/pipe.c | current->filp[fd[0]] = NULL; |
fd | 388 | fs/pipe.c | current->filp[fd[1]] = NULL; |
fd | 401 | fs/pipe.c | put_fs_long(fd[0],0+fildes); |
fd | 402 | 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->filp[fd] || !p->filp[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->filp[fd] || !p->filp[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 | 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->filp[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->filp[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->filp[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->filp[fd]) || !(inode=file->f_inode)) |
fd | 153 | fs/stat.c | asmlinkage int sys_fstat(unsigned int fd, struct old_stat * statbuf) |
fd | 162 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
fd | 168 | fs/stat.c | asmlinkage int sys_newfstat(unsigned int fd, struct new_stat * statbuf) |
fd | 177 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
fd | 32 | include/linux/binfmts.h | int (*load_shlib)(int fd); |
fd | 24 | include/linux/nfs_mount.h | int fd; /* 1 */ |
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 | 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 | 140 | mm/mmap.c | unsigned long fd; |
fd | 146 | mm/mmap.c | fd = get_fs_long(buffer+4); |
fd | 147 | mm/mmap.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 99 | net/socket.c | int fd; |
fd | 105 | net/socket.c | for (fd = 0; fd < NR_OPEN; ++fd) |
fd | 106 | net/socket.c | if (!current->filp[fd]) break; |
fd | 107 | net/socket.c | if (fd == NR_OPEN) { |
fd | 111 | net/socket.c | FD_CLR(fd, ¤t->close_on_exec); |
fd | 112 | net/socket.c | current->filp[fd] = file; |
fd | 120 | net/socket.c | return(fd); |
fd | 130 | net/socket.c | toss_fd(int fd) |
fd | 132 | net/socket.c | sys_close(fd); /* the count protects us from iput */ |
fd | 148 | net/socket.c | sockfd_lookup(int fd, struct file **pfile) |
fd | 152 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) return(NULL); |
fd | 418 | net/socket.c | int i, fd; |
fd | 463 | net/socket.c | if ((fd = get_fd(SOCK_INODE(sock))) < 0) { |
fd | 468 | net/socket.c | return(fd); |
fd | 525 | net/socket.c | sock_bind(int fd, struct sockaddr *umyaddr, int addrlen) |
fd | 530 | net/socket.c | DPRINTF((net_debug, "NET: sock_bind: fd = %d\n", fd)); |
fd | 531 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 533 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 548 | net/socket.c | sock_listen(int fd, int backlog) |
fd | 552 | net/socket.c | DPRINTF((net_debug, "NET: sock_listen: fd = %d\n", fd)); |
fd | 553 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 555 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 572 | net/socket.c | sock_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen) |
fd | 578 | net/socket.c | DPRINTF((net_debug, "NET: sock_accept: fd = %d\n", fd)); |
fd | 579 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 582 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK); |
fd | 610 | net/socket.c | if ((fd = get_fd(SOCK_INODE(newsock))) < 0) { |
fd | 621 | net/socket.c | return(fd); |
fd | 627 | net/socket.c | sock_connect(int fd, struct sockaddr *uservaddr, int addrlen) |
fd | 633 | net/socket.c | DPRINTF((net_debug, "NET: sock_connect: fd = %d\n", fd)); |
fd | 634 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || (file=current->filp[fd]) == NULL) |
fd | 637 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK); |
fd | 664 | net/socket.c | sock_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 668 | net/socket.c | DPRINTF((net_debug, "NET: sock_getsockname: fd = %d\n", fd)); |
fd | 669 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 671 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 677 | net/socket.c | sock_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 681 | net/socket.c | DPRINTF((net_debug, "NET: sock_getpeername: fd = %d\n", fd)); |
fd | 682 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 684 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 690 | net/socket.c | sock_send(int fd, void * buff, int len, unsigned flags) |
fd | 697 | net/socket.c | fd, buff, len, flags)); |
fd | 699 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 701 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 708 | net/socket.c | sock_sendto(int fd, void * buff, int len, unsigned flags, |
fd | 716 | net/socket.c | " addr=%X, alen = %d\n", fd, buff, len, flags, addr, addr_len)); |
fd | 718 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 720 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 728 | net/socket.c | sock_recv(int fd, void * buff, int len, unsigned flags) |
fd | 735 | net/socket.c | fd, buff, len, flags)); |
fd | 737 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 739 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 746 | net/socket.c | sock_recvfrom(int fd, void * buff, int len, unsigned flags, |
fd | 754 | net/socket.c | " addr=%X, alen=%X\n", fd, buff, len, flags, addr, addr_len)); |
fd | 756 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 758 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 766 | net/socket.c | sock_setsockopt(int fd, int level, int optname, char *optval, int optlen) |
fd | 772 | net/socket.c | fd, level, optname)); |
fd | 776 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 778 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 785 | net/socket.c | sock_getsockopt(int fd, int level, int optname, char *optval, int *optlen) |
fd | 791 | net/socket.c | fd, level, optname)); |
fd | 795 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 797 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 805 | net/socket.c | sock_shutdown(int fd, int how) |
fd | 810 | net/socket.c | DPRINTF((net_debug, "NET: sock_shutdown(fd = %d, how = %d)\n", fd, how)); |
fd | 812 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 815 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |