tag | line | file | source code |
fd | 34 | fs/binfmt_coff.c | asmlinkage int sys_close (unsigned fd); |
fd | 125 | fs/binfmt_coff.c | int fd = -1; /* Open file descriptor */ |
fd | 379 | fs/binfmt_coff.c | fd = open_inode (bprm->inode, O_RDONLY); |
fd | 380 | fs/binfmt_coff.c | if (fd < 0) { |
fd | 382 | fs/binfmt_coff.c | printk ("can not open inode, result = %d\n", fd); |
fd | 384 | fs/binfmt_coff.c | status = fd; |
fd | 387 | fs/binfmt_coff.c | fp = current->filp[fd]; |
fd | 390 | fs/binfmt_coff.c | fd = -1; /* Invalidate the open file descriptor */ |
fd | 568 | fs/binfmt_coff.c | if (fd >= 0) |
fd | 569 | fs/binfmt_coff.c | sys_close (fd); /* Close unused code file */ |
fd | 737 | fs/binfmt_coff.c | load_coff_library (int fd) |
fd | 759 | fs/binfmt_coff.c | file = current->filp[fd]; |
fd | 21 | fs/binfmt_elf.c | asmlinkage int sys_close(unsigned fd); |
fd | 548 | fs/binfmt_elf.c | int load_elf_library(int fd){ |
fd | 561 | fs/binfmt_elf.c | file = current->filp[fd]; |
fd | 567 | fs/binfmt_elf.c | sys_close(fd); |
fd | 620 | fs/binfmt_elf.c | sys_close(fd); |
fd | 255 | fs/buffer.c | asmlinkage int sys_fsync(unsigned int fd) |
fd | 260 | 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 | 240 | fs/exec.c | int fd, retval; |
fd | 244 | fs/exec.c | fd = sys_open(library, 0, 0); |
fd | 245 | fs/exec.c | if (fd < 0) |
fd | 246 | fs/exec.c | return fd; |
fd | 247 | fs/exec.c | file = current->filp[fd]; |
fd | 255 | fs/exec.c | retval = fn(fd); |
fd | 259 | fs/exec.c | sys_close(fd); |
fd | 731 | fs/exec.c | extern int load_aout_library(int fd); |
fd | 736 | fs/exec.c | extern int load_elf_library(int fd); |
fd | 742 | fs/exec.c | extern int load_coff_library(int fd); |
fd | 777 | fs/exec.c | int fd, error; |
fd | 821 | fs/exec.c | fd = open_inode(bprm->inode, O_RDONLY); |
fd | 823 | fs/exec.c | if (fd < 0) |
fd | 824 | fs/exec.c | return fd; |
fd | 825 | fs/exec.c | file = current->filp[fd]; |
fd | 827 | fs/exec.c | sys_close(fd); |
fd | 840 | fs/exec.c | sys_close(fd); |
fd | 848 | fs/exec.c | sys_close(fd); |
fd | 871 | fs/exec.c | int load_aout_library(int fd) |
fd | 881 | 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 | 213 | fs/open.c | asmlinkage int sys_fchdir(unsigned int fd) |
fd | 218 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[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->filp[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->filp[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->filp[fd]) |
fd | 385 | fs/open.c | if (fd>=NR_OPEN) |
fd | 387 | fs/open.c | FD_CLR(fd,¤t->close_on_exec); |
fd | 391 | fs/open.c | current->filp[fd] = f; |
fd | 400 | fs/open.c | current->filp[fd]=NULL; |
fd | 416 | fs/open.c | current->filp[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->close_on_exec); |
fd | 472 | fs/open.c | if (!(filp = current->filp[fd])) |
fd | 474 | fs/open.c | current->filp[fd] = NULL; |
fd | 475 | fs/open.c | return (close_fp (filp, fd)); |
fd | 382 | fs/pipe.c | int fd[2]; |
fd | 398 | fs/pipe.c | current->filp[ fd[j]=i ] = f[j]; |
fd | 402 | fs/pipe.c | current->filp[fd[0]]=NULL; |
fd | 409 | fs/pipe.c | current->filp[fd[0]] = NULL; |
fd | 410 | fs/pipe.c | current->filp[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->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 | 148 | mm/mmap.c | unsigned long fd = get_fs_long(buffer+4); |
fd | 149 | mm/mmap.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 108 | net/socket.c | int fd; |
fd | 114 | net/socket.c | for (fd = 0; fd < NR_OPEN; ++fd) |
fd | 115 | net/socket.c | if (!current->filp[fd]) break; |
fd | 116 | net/socket.c | if (fd == NR_OPEN) { |
fd | 120 | net/socket.c | FD_CLR(fd, ¤t->close_on_exec); |
fd | 121 | net/socket.c | current->filp[fd] = file; |
fd | 129 | net/socket.c | return(fd); |
fd | 139 | net/socket.c | toss_fd(int fd) |
fd | 141 | net/socket.c | sys_close(fd); /* the count protects us from iput */ |
fd | 165 | net/socket.c | sockfd_lookup(int fd, struct file **pfile) |
fd | 169 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) return(NULL); |
fd | 438 | net/socket.c | int i, fd; |
fd | 483 | net/socket.c | if ((fd = get_fd(SOCK_INODE(sock))) < 0) { |
fd | 488 | net/socket.c | return(fd); |
fd | 545 | net/socket.c | sock_bind(int fd, struct sockaddr *umyaddr, int addrlen) |
fd | 550 | net/socket.c | DPRINTF((net_debug, "NET: sock_bind: fd = %d\n", fd)); |
fd | 551 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 553 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 568 | net/socket.c | sock_listen(int fd, int backlog) |
fd | 572 | net/socket.c | DPRINTF((net_debug, "NET: sock_listen: fd = %d\n", fd)); |
fd | 573 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 575 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 592 | net/socket.c | sock_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen) |
fd | 598 | net/socket.c | DPRINTF((net_debug, "NET: sock_accept: fd = %d\n", fd)); |
fd | 599 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 602 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK); |
fd | 630 | net/socket.c | if ((fd = get_fd(SOCK_INODE(newsock))) < 0) { |
fd | 641 | net/socket.c | return(fd); |
fd | 647 | net/socket.c | sock_connect(int fd, struct sockaddr *uservaddr, int addrlen) |
fd | 653 | net/socket.c | DPRINTF((net_debug, "NET: sock_connect: fd = %d\n", fd)); |
fd | 654 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || (file=current->filp[fd]) == NULL) |
fd | 657 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK); |
fd | 684 | net/socket.c | sock_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 688 | net/socket.c | DPRINTF((net_debug, "NET: sock_getsockname: fd = %d\n", fd)); |
fd | 689 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 691 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 697 | net/socket.c | sock_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 701 | net/socket.c | DPRINTF((net_debug, "NET: sock_getpeername: fd = %d\n", fd)); |
fd | 702 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 704 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 710 | net/socket.c | sock_send(int fd, void * buff, int len, unsigned flags) |
fd | 717 | net/socket.c | fd, buff, len, flags)); |
fd | 719 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 721 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 728 | net/socket.c | sock_sendto(int fd, void * buff, int len, unsigned flags, |
fd | 736 | net/socket.c | " addr=%X, alen = %d\n", fd, buff, len, flags, addr, addr_len)); |
fd | 738 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 740 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 748 | net/socket.c | sock_recv(int fd, void * buff, int len, unsigned flags) |
fd | 755 | net/socket.c | fd, buff, len, flags)); |
fd | 757 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 759 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 766 | net/socket.c | sock_recvfrom(int fd, void * buff, int len, unsigned flags, |
fd | 774 | net/socket.c | " addr=%X, alen=%X\n", fd, buff, len, flags, addr, addr_len)); |
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 | 786 | net/socket.c | sock_setsockopt(int fd, int level, int optname, char *optval, int optlen) |
fd | 792 | net/socket.c | fd, level, optname)); |
fd | 796 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 798 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 805 | net/socket.c | sock_getsockopt(int fd, int level, int optname, char *optval, int *optlen) |
fd | 811 | net/socket.c | fd, level, optname)); |
fd | 815 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 817 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 825 | net/socket.c | sock_shutdown(int fd, int how) |
fd | 830 | net/socket.c | DPRINTF((net_debug, "NET: sock_shutdown(fd = %d, how = %d)\n", fd, how)); |
fd | 832 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 835 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |