tag | line | file | source code |
fd | 36 | fs/exec.c | extern int sys_close(int fd); |
fd | 16 | fs/fcntl.c | extern int sys_close(int 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 | 53 | fs/fcntl.c | int sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) |
fd | 58 | fs/fcntl.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
fd | 62 | fs/fcntl.c | return dupfd(fd,arg); |
fd | 64 | fs/fcntl.c | return (current->close_on_exec>>fd)&1; |
fd | 67 | fs/fcntl.c | current->close_on_exec |= (1<<fd); |
fd | 69 | fs/fcntl.c | current->close_on_exec &= ~(1<<fd); |
fd | 78 | fs/fcntl.c | return fcntl_getlk(fd, (struct flock *) arg); |
fd | 80 | fs/fcntl.c | return fcntl_setlk(fd, cmd, (struct flock *) arg); |
fd | 82 | fs/fcntl.c | return fcntl_setlk(fd, cmd, (struct flock *) arg); |
fd | 48 | fs/ioctl.c | int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) |
fd | 52 | fs/ioctl.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
fd | 51 | fs/locks.c | int fcntl_getlk(unsigned int fd, struct flock *l) |
fd | 57 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
fd | 88 | fs/locks.c | int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l) |
fd | 98 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
fd | 53 | fs/open.c | int sys_fstatfs(unsigned int fd, struct statfs * buf) |
fd | 59 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 94 | fs/open.c | int sys_ftruncate(unsigned int fd, unsigned int length) |
fd | 99 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 227 | fs/open.c | int sys_fchmod(unsigned int fd, mode_t mode) |
fd | 232 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 267 | fs/open.c | int sys_fchown(unsigned int fd, uid_t user, gid_t group) |
fd | 272 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 332 | fs/open.c | int i,fd; |
fd | 334 | fs/open.c | for(fd=0 ; fd<NR_OPEN ; fd++) |
fd | 335 | fs/open.c | if (!current->filp[fd]) |
fd | 337 | fs/open.c | if (fd>=NR_OPEN) |
fd | 339 | fs/open.c | current->close_on_exec &= ~(1<<fd); |
fd | 343 | fs/open.c | current->filp[fd] = f; |
fd | 351 | fs/open.c | current->filp[fd]=NULL; |
fd | 374 | fs/open.c | current->filp[fd]=NULL; |
fd | 377 | fs/open.c | return (fd); |
fd | 408 | fs/open.c | int sys_close(unsigned int fd) |
fd | 412 | fs/open.c | if (fd >= NR_OPEN) |
fd | 414 | fs/open.c | current->close_on_exec &= ~(1<<fd); |
fd | 415 | fs/open.c | if (!(filp = current->filp[fd])) |
fd | 417 | fs/open.c | current->filp[fd] = NULL; |
fd | 206 | fs/pipe.c | int fd[2]; |
fd | 220 | fs/pipe.c | current->filp[ fd[j]=i ] = f[j]; |
fd | 224 | fs/pipe.c | current->filp[fd[0]]=NULL; |
fd | 231 | fs/pipe.c | current->filp[fd[0]] = NULL; |
fd | 232 | fs/pipe.c | current->filp[fd[1]] = NULL; |
fd | 244 | fs/pipe.c | put_fs_long(fd[0],0+fildes); |
fd | 245 | fs/pipe.c | put_fs_long(fd[1],1+fildes); |
fd | 53 | fs/proc/fd.c | unsigned int ino, pid, fd, c; |
fd | 83 | fs/proc/fd.c | fd = 0; |
fd | 88 | fs/proc/fd.c | fd = 0xfffff; |
fd | 91 | fs/proc/fd.c | fd *= 10; |
fd | 92 | fs/proc/fd.c | fd += c; |
fd | 93 | fs/proc/fd.c | if (fd & 0xffff0000) { |
fd | 94 | fs/proc/fd.c | fd = 0xfffff; |
fd | 104 | fs/proc/fd.c | if (fd >= NR_OPEN || !p->filp[fd] || !p->filp[fd]->f_inode) |
fd | 106 | fs/proc/fd.c | ino = (pid << 16) + 0x100 + fd; |
fd | 108 | fs/proc/fd.c | if (fd >= p->numlibraries) |
fd | 110 | fs/proc/fd.c | ino = (pid << 16) + 0x200 + fd; |
fd | 121 | fs/proc/fd.c | unsigned int fd, pid, ino; |
fd | 133 | fs/proc/fd.c | fd = filp->f_pos; |
fd | 135 | fs/proc/fd.c | if (fd < 2) { |
fd | 136 | fs/proc/fd.c | i = j = fd+1; |
fd | 137 | fs/proc/fd.c | if (!fd) |
fd | 138 | fs/proc/fd.c | fd = inode->i_ino; |
fd | 140 | fs/proc/fd.c | fd = (inode->i_ino & 0xffff0000) | 2; |
fd | 141 | fs/proc/fd.c | put_fs_long(fd, &dirent->d_ino); |
fd | 148 | fs/proc/fd.c | fd -= 2; |
fd | 155 | fs/proc/fd.c | if (fd >= NR_OPEN) |
fd | 157 | fs/proc/fd.c | if (!p->filp[fd] || !p->filp[fd]->f_inode) |
fd | 160 | fs/proc/fd.c | if (fd >= p->numlibraries) |
fd | 164 | fs/proc/fd.c | while (fd >= j) { |
fd | 170 | fs/proc/fd.c | ino = (pid << 16) + 0x100 + fd; |
fd | 172 | fs/proc/fd.c | ino = (pid << 16) + 0x200 + fd; |
fd | 177 | fs/proc/fd.c | put_fs_byte('0'+(fd % 10), i+dirent->d_name); |
fd | 178 | fs/proc/fd.c | fd /= 10; |
fd | 20 | fs/read_write.c | 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 | 35 | fs/read_write.c | int sys_lseek(unsigned int fd, off_t offset, unsigned int origin) |
fd | 40 | fs/read_write.c | if (fd >= NR_OPEN || !(file=current->filp[fd]) || !(file->f_inode)) |
fd | 68 | fs/read_write.c | int sys_read(unsigned int fd,char * buf,unsigned int count) |
fd | 73 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
fd | 85 | fs/read_write.c | int sys_write(unsigned int fd,char * buf,unsigned int count) |
fd | 90 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
fd | 130 | fs/stat.c | int sys_fstat(unsigned int fd, struct old_stat * statbuf) |
fd | 135 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
fd | 141 | fs/stat.c | int sys_newfstat(unsigned int fd, struct new_stat * statbuf) |
fd | 146 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
fd | 15 | include/linux/time.h | #define FD_SET(fd,fdsetp) (*(fdsetp) |= (1 << (fd))) |
fd | 16 | include/linux/time.h | #define FD_CLR(fd,fdsetp) (*(fdsetp) &= ~(1 << (fd))) |
fd | 17 | include/linux/time.h | #define FD_ISSET(fd,fdsetp) ((*(fdsetp) >> fd) & 1) |
fd | 44 | init/main.c | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) |
fd | 45 | init/main.c | static inline _syscall1(int,dup,int,fd) |
fd | 48 | init/main.c | static inline _syscall1(int,close,int,fd) |
fd | 20 | kernel/exit.c | int sys_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 | 89 | mm/mmap.c | int prot, flags, fd; |
fd | 97 | mm/mmap.c | fd = (int) get_fs_long(buffer+4); /* object to map */ |
fd | 100 | mm/mmap.c | if (fd >= NR_OPEN || fd < 0 || !(file = current->filp[fd])) |
fd | 17 | net/socket.c | extern int sys_close(int fd); |
fd | 83 | net/socket.c | int fd, i; |
fd | 89 | net/socket.c | for (fd = 0; fd < NR_OPEN; ++fd) |
fd | 90 | net/socket.c | if (!current->filp[fd]) |
fd | 92 | net/socket.c | if (fd == NR_OPEN) |
fd | 94 | net/socket.c | current->close_on_exec &= ~(1 << fd); |
fd | 100 | net/socket.c | current->filp[fd] = file; |
fd | 107 | net/socket.c | return fd; |
fd | 116 | net/socket.c | toss_fd(int fd) |
fd | 118 | net/socket.c | current->filp[fd]->f_inode = NULL; /* safe from iput */ |
fd | 119 | net/socket.c | sys_close(fd); |
fd | 134 | net/socket.c | sockfd_lookup(int fd, struct file **pfile) |
fd | 138 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) |
fd | 396 | net/socket.c | int i, fd; |
fd | 443 | net/socket.c | if ((fd = get_fd(SOCK_INODE(sock))) < 0) { |
fd | 448 | net/socket.c | return fd; |
fd | 502 | net/socket.c | sock_bind(int fd, struct sockaddr *umyaddr, int addrlen) |
fd | 507 | net/socket.c | PRINTK("sys_bind: fd = %d\n", fd); |
fd | 508 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 523 | net/socket.c | sock_listen(int fd, int backlog) |
fd | 527 | net/socket.c | PRINTK("sys_listen: fd = %d\n", fd); |
fd | 528 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 549 | net/socket.c | sock_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen) |
fd | 555 | net/socket.c | PRINTK("sys_accept: fd = %d\n", fd); |
fd | 556 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) |
fd | 578 | net/socket.c | if ((fd = get_fd(SOCK_INODE(newsock))) < 0) { |
fd | 586 | net/socket.c | sys_close (fd); |
fd | 597 | net/socket.c | return fd; |
fd | 604 | net/socket.c | sock_connect(int fd, struct sockaddr *uservaddr, int addrlen) |
fd | 610 | net/socket.c | PRINTK("sys_connect: fd = %d\n", fd); |
fd | 611 | net/socket.c | if (!(sock = sockfd_lookup(fd, &file))) |
fd | 626 | net/socket.c | sock_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 630 | net/socket.c | PRINTK("sys_getsockname: fd = %d\n", fd); |
fd | 631 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 637 | net/socket.c | sock_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len) |
fd | 641 | net/socket.c | PRINTK("sys_getpeername: fd = %d\n", fd); |
fd | 642 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 651 | net/socket.c | sys_send( int fd, void * buff, int len, unsigned flags) |
fd | 657 | net/socket.c | fd, buff, len, flags); |
fd | 659 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 662 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 671 | net/socket.c | sys_sendto( int fd, void * buff, int len, unsigned flags, |
fd | 678 | net/socket.c | " addr=%X, alen = %d\n", fd, buff, len, flags, addr, addr_len); |
fd | 680 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 683 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 694 | net/socket.c | sys_recv( int fd, void * buff, int len, unsigned flags) |
fd | 700 | net/socket.c | fd, buff, len, flags); |
fd | 702 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 705 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 714 | net/socket.c | sys_recvfrom( int fd, void * buff, int len, unsigned flags, |
fd | 721 | net/socket.c | " addr=%X, alen=%X\n", fd, buff, len, flags, addr, addr_len); |
fd | 723 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 726 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 737 | net/socket.c | sys_setsockopt (int fd, int level, int optname, char *optval, int optlen) |
fd | 742 | net/socket.c | PRINTK ("sys_setsockopt(fd=%d, level=%d, optname=%d,\n",fd, level, |
fd | 746 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 749 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 757 | net/socket.c | sys_getsockopt (int fd, int level, int optname, char *optval, int *optlen) |
fd | 761 | net/socket.c | PRINTK ("sys_getsockopt(fd=%d, level=%d, optname=%d,\n",fd, level, |
fd | 765 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
fd | 768 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |
fd | 778 | net/socket.c | sys_shutdown( int fd, int how) |
fd | 783 | net/socket.c | PRINTK("sys_shutdown (fd = %d, how = %d)\n",fd, how); |
fd | 785 | net/socket.c | file = current->filp[fd]; |
fd | 786 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || file == NULL) |
fd | 789 | net/socket.c | if (!(sock = sockfd_lookup(fd, NULL))) |