tag | line | file | source code |
fd | 59 | fs/binfmt_coff.c | asmlinkage int sys_close (unsigned fd); |
fd | 119 | fs/binfmt_coff.c | int fd = -1; /* Open file descriptor */ |
fd | 373 | fs/binfmt_coff.c | fd = open_inode (bprm->inode, O_RDONLY); |
fd | 374 | fs/binfmt_coff.c | if (fd < 0) { |
fd | 376 | fs/binfmt_coff.c | printk ("can not open inode, result = %d\n", fd); |
fd | 378 | fs/binfmt_coff.c | status = fd; |
fd | 381 | fs/binfmt_coff.c | fp = current->filp[fd]; |
fd | 384 | fs/binfmt_coff.c | fd = -1; /* Invalidate the open file descriptor */ |
fd | 560 | fs/binfmt_coff.c | if (fd >= 0) |
fd | 561 | fs/binfmt_coff.c | sys_close (fd); /* Close unused code file */ |
fd | 720 | fs/binfmt_coff.c | load_coff_library (int fd) |
fd | 742 | fs/binfmt_coff.c | file = current->filp[fd]; |
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 | 726 | fs/exec.c | extern int load_aout_library(int fd); |
fd | 731 | fs/exec.c | extern int load_elf_library(int fd); |
fd | 737 | fs/exec.c | extern int load_coff_library(int fd); |
fd | 761 | fs/exec.c | int fd, error; |
fd | 804 | fs/exec.c | fd = open_inode(bprm->inode, O_RDONLY); |
fd | 806 | fs/exec.c | if (fd < 0) |
fd | 807 | fs/exec.c | return fd; |
fd | 808 | fs/exec.c | file = current->filp[fd]; |
fd | 810 | fs/exec.c | sys_close(fd); |
fd | 823 | fs/exec.c | sys_close(fd); |
fd | 831 | fs/exec.c | sys_close(fd); |
fd | 854 | fs/exec.c | int load_aout_library(int fd) |
fd | 864 | 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 | 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 | 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 | 101 | net/socket.c | int fd; |
fd | 107 | net/socket.c | for (fd = 0; fd < NR_OPEN; ++fd) |
fd | 108 | net/socket.c | if (!current->filp[fd]) break; |
fd | 109 | net/socket.c | if (fd == NR_OPEN) { |
fd | 113 | net/socket.c | FD_CLR(fd, ¤t->close_on_exec); |
fd | 114 | net/socket.c | current->filp[fd] = file; |
fd | 122 | net/socket.c | return(fd); |
fd | 132 | net/socket.c | toss_fd(int fd) |
fd | 134 | net/socket.c | sys_close(fd); /* the count protects us from iput */ |
fd | 158 | net/socket.c | sockfd_lookup(int fd, struct file **pfile) |
fd | 162 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) return(NULL); |
fd | 431 | net/socket.c | int i, fd; |
fd | 476 | net/socket.c | if ((fd = get_fd(SOCK_INODE(sock))) < 0) { |
fd | 481 | net/socket.c | return(fd); |
fd | 538 | net/socket.c | sock_bind(int fd, struct sockaddr *umyaddr, int addrlen) |
fd | 543 | net/socket.c | DPRINTF((net_debug, "NET: sock_bind: fd = %d\n", fd)); |
fd | 544 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 546 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 561 | net/socket.c | sock_listen(int fd, int backlog) |
fd | 565 | net/socket.c | DPRINTF((net_debug, "NET: sock_listen: fd = %d\n", fd)); |
fd | 566 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 568 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 585 | net/socket.c | sock_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen) |
fd | 591 | net/socket.c | DPRINTF((net_debug, "NET: sock_accept: fd = %d\n", fd)); |
fd | 592 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 595 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK); |
fd | 623 | net/socket.c | if ((fd = get_fd(SOCK_INODE(newsock))) < 0) { |
fd | 634 | net/socket.c | return(fd); |
fd | 640 | net/socket.c | sock_connect(int fd, struct sockaddr *uservaddr, int addrlen) |
fd | 646 | net/socket.c | DPRINTF((net_debug, "NET: sock_connect: fd = %d\n", fd)); |
fd | 647 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || (file=current->filp[fd]) == NULL) |
fd | 650 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK); |
fd | 677 | net/socket.c | sock_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 681 | net/socket.c | DPRINTF((net_debug, "NET: sock_getsockname: 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_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 694 | net/socket.c | DPRINTF((net_debug, "NET: sock_getpeername: fd = %d\n", fd)); |
fd | 695 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
fd | 697 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 703 | net/socket.c | sock_send(int fd, void * buff, int len, unsigned flags) |
fd | 710 | net/socket.c | fd, buff, len, flags)); |
fd | 712 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 714 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 721 | net/socket.c | sock_sendto(int fd, void * buff, int len, unsigned flags, |
fd | 729 | net/socket.c | " addr=%X, alen = %d\n", fd, buff, len, flags, addr, addr_len)); |
fd | 731 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 733 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 741 | net/socket.c | sock_recv(int fd, void * buff, int len, unsigned flags) |
fd | 748 | net/socket.c | fd, buff, len, flags)); |
fd | 750 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 752 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 759 | net/socket.c | sock_recvfrom(int fd, void * buff, int len, unsigned flags, |
fd | 767 | net/socket.c | " addr=%X, alen=%X\n", fd, buff, len, flags, addr, addr_len)); |
fd | 769 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 771 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 779 | net/socket.c | sock_setsockopt(int fd, int level, int optname, char *optval, int optlen) |
fd | 785 | net/socket.c | fd, level, optname)); |
fd | 789 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 791 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 798 | net/socket.c | sock_getsockopt(int fd, int level, int optname, char *optval, int *optlen) |
fd | 804 | net/socket.c | fd, level, optname)); |
fd | 808 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 810 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |
fd | 818 | net/socket.c | sock_shutdown(int fd, int how) |
fd | 823 | net/socket.c | DPRINTF((net_debug, "NET: sock_shutdown(fd = %d, how = %d)\n", fd, how)); |
fd | 825 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 828 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK); |