taglinefilesource code
fd36fs/exec.cextern int sys_close(int fd);
fd16fs/fcntl.cextern int sys_close(int fd);
fd20fs/fcntl.cstatic int dupfd(unsigned int fd, unsigned int arg)
fd22fs/fcntl.cif (fd >= NR_OPEN || !current->filp[fd])
fd34fs/fcntl.c(current->filp[arg] = current->filp[fd])->f_count++;
fd53fs/fcntl.cint sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
fd58fs/fcntl.cif (fd >= NR_OPEN || !(filp = current->filp[fd]))
fd62fs/fcntl.creturn dupfd(fd,arg);
fd64fs/fcntl.creturn (current->close_on_exec>>fd)&1;
fd67fs/fcntl.ccurrent->close_on_exec |= (1<<fd);
fd69fs/fcntl.ccurrent->close_on_exec &= ~(1<<fd);
fd78fs/fcntl.creturn fcntl_getlk(fd, (struct flock *) arg);
fd80fs/fcntl.creturn fcntl_setlk(fd, cmd, (struct flock *) arg);
fd82fs/fcntl.creturn fcntl_setlk(fd, cmd, (struct flock *) arg);
fd49fs/ioctl.cint sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
fd54fs/ioctl.cif (fd >= NR_OPEN || !(filp = current->filp[fd]))
fd58fs/ioctl.ccurrent->close_on_exec |= (1 << fd);
fd62fs/ioctl.ccurrent->close_on_exec &= ~(1 << fd);
fd51fs/locks.cint fcntl_getlk(unsigned int fd, struct flock *l)
fd57fs/locks.cif (fd >= NR_OPEN || !(filp = current->filp[fd]))
fd88fs/locks.cint fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l)
fd98fs/locks.cif (fd >= NR_OPEN || !(filp = current->filp[fd]))
fd53fs/open.cint sys_fstatfs(unsigned int fd, struct statfs * buf)
fd59fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
fd94fs/open.cint sys_ftruncate(unsigned int fd, unsigned int length)
fd99fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
fd227fs/open.cint sys_fchmod(unsigned int fd, mode_t mode)
fd232fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
fd267fs/open.cint sys_fchown(unsigned int fd, uid_t user, gid_t group)
fd272fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
fd332fs/open.cint i,fd;
fd334fs/open.cfor(fd=0 ; fd<NR_OPEN ; fd++)
fd335fs/open.cif (!current->filp[fd])
fd337fs/open.cif (fd>=NR_OPEN)
fd339fs/open.ccurrent->close_on_exec &= ~(1<<fd);
fd343fs/open.ccurrent->filp[fd] = f;
fd351fs/open.ccurrent->filp[fd]=NULL;
fd374fs/open.ccurrent->filp[fd]=NULL;
fd377fs/open.creturn (fd);
fd408fs/open.cint sys_close(unsigned int fd)
fd412fs/open.cif (fd >= NR_OPEN)
fd414fs/open.ccurrent->close_on_exec &= ~(1<<fd);
fd415fs/open.cif (!(filp = current->filp[fd]))
fd417fs/open.ccurrent->filp[fd] = NULL;
fd209fs/pipe.cint fd[2];
fd223fs/pipe.ccurrent->filp[ fd[j]=i ] = f[j];
fd227fs/pipe.ccurrent->filp[fd[0]]=NULL;
fd234fs/pipe.ccurrent->filp[fd[0]] = NULL;
fd235fs/pipe.ccurrent->filp[fd[1]] = NULL;
fd247fs/pipe.cput_fs_long(fd[0],0+fildes);
fd248fs/pipe.cput_fs_long(fd[1],1+fildes);
fd54fs/proc/fd.cunsigned int ino, pid, fd, c;
fd85fs/proc/fd.cfd = 0;
fd90fs/proc/fd.cfd = 0xfffff;
fd93fs/proc/fd.cfd *= 10;
fd94fs/proc/fd.cfd += c;
fd95fs/proc/fd.cif (fd & 0xffff0000) {
fd96fs/proc/fd.cfd = 0xfffff;
fd106fs/proc/fd.cif (fd >= NR_OPEN || !p->filp[fd] || !p->filp[fd]->f_inode)
fd108fs/proc/fd.cino = (pid << 16) + 0x100 + fd;
fd110fs/proc/fd.cif (fd >= p->numlibraries)
fd112fs/proc/fd.cino = (pid << 16) + 0x200 + fd;
fd123fs/proc/fd.cunsigned int fd, pid, ino;
fd135fs/proc/fd.cfd = filp->f_pos;
fd137fs/proc/fd.cif (fd < 2) {
fd138fs/proc/fd.ci = j = fd+1;
fd139fs/proc/fd.cif (!fd)
fd140fs/proc/fd.cfd = inode->i_ino;
fd142fs/proc/fd.cfd = (inode->i_ino & 0xffff0000) | 2;
fd143fs/proc/fd.cput_fs_long(fd, &dirent->d_ino);
fd150fs/proc/fd.cfd -= 2;
fd157fs/proc/fd.cif (fd >= NR_OPEN)
fd159fs/proc/fd.cif (!p->filp[fd] || !p->filp[fd]->f_inode)
fd162fs/proc/fd.cif (fd >= p->numlibraries)
fd166fs/proc/fd.cwhile (fd >= j) {
fd172fs/proc/fd.cino = (pid << 16) + 0x100 + fd;
fd174fs/proc/fd.cino = (pid << 16) + 0x200 + fd;
fd179fs/proc/fd.cput_fs_byte('0'+(fd % 10), i+dirent->d_name);
fd180fs/proc/fd.cfd /= 10;
fd20fs/read_write.cint sys_readdir(unsigned int fd, struct dirent * dirent, unsigned int count)
fd25fs/read_write.cif (fd >= NR_OPEN || !(file = current->filp[fd]) ||
fd35fs/read_write.cint sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
fd40fs/read_write.cif (fd >= NR_OPEN || !(file=current->filp[fd]) || !(file->f_inode))
fd68fs/read_write.cint sys_read(unsigned int fd,char * buf,unsigned int count)
fd73fs/read_write.cif (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode))
fd85fs/read_write.cint sys_write(unsigned int fd,char * buf,unsigned int count)
fd90fs/read_write.cif (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode))
fd130fs/stat.cint sys_fstat(unsigned int fd, struct old_stat * statbuf)
fd135fs/stat.cif (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode))
fd141fs/stat.cint sys_newfstat(unsigned int fd, struct new_stat * statbuf)
fd146fs/stat.cif (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode))
fd15include/linux/time.h#define FD_SET(fd,fdsetp)  (*(fdsetp) |= (1 << (fd)))
fd16include/linux/time.h#define FD_CLR(fd,fdsetp)  (*(fdsetp) &= ~(1 << (fd)))
fd17include/linux/time.h#define FD_ISSET(fd,fdsetp)  ((*(fdsetp) >> fd) & 1)
fd45init/main.cstatic inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
fd46init/main.cstatic inline _syscall1(int,dup,int,fd)
fd49init/main.cstatic inline _syscall1(int,close,int,fd)
fd20kernel/exit.cint sys_close(int fd);
fd10lib/close.c_syscall1(int,close,int,fd)
fd10lib/dup.c_syscall1(int,dup,int,fd)
fd11lib/write.c_syscall3(int,write,int,fd,const char *,buf,off_t,count)
fd90mm/mmap.cint prot, flags, fd;
fd98mm/mmap.cfd = (int)     get_fs_long(buffer+4);  /* object to map */
fd101mm/mmap.cif (fd >= NR_OPEN || fd < 0 || !(file = current->filp[fd]))
fd17net/socket.cextern int sys_close(int fd);
fd84net/socket.cint fd, i;
fd90net/socket.cfor (fd = 0; fd < NR_OPEN; ++fd)
fd91net/socket.cif (!current->filp[fd])
fd93net/socket.cif (fd == NR_OPEN)
fd95net/socket.ccurrent->close_on_exec &= ~(1 << fd);
fd101net/socket.ccurrent->filp[fd] = file;
fd108net/socket.creturn fd;
fd117net/socket.ctoss_fd(int fd)
fd119net/socket.ccurrent->filp[fd]->f_inode = NULL;  /* safe from iput */
fd120net/socket.csys_close(fd);
fd135net/socket.csockfd_lookup(int fd, struct file **pfile)
fd139net/socket.cif (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd]))
fd397net/socket.cint i, fd;
fd444net/socket.cif ((fd = get_fd(SOCK_INODE(sock))) < 0) {
fd449net/socket.creturn fd;
fd503net/socket.csock_bind(int fd, struct sockaddr *umyaddr, int addrlen)
fd508net/socket.cPRINTK("sys_bind: fd = %d\n", fd);
fd509net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd524net/socket.csock_listen(int fd, int backlog)
fd528net/socket.cPRINTK("sys_listen: fd = %d\n", fd);
fd529net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd550net/socket.csock_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen)
fd556net/socket.cPRINTK("sys_accept: fd = %d\n", fd);
fd557net/socket.cif (!(sock = sockfd_lookup(fd, &file)))
fd579net/socket.cif ((fd = get_fd(SOCK_INODE(newsock))) < 0) {
fd587net/socket.csys_close (fd);
fd598net/socket.creturn fd;
fd605net/socket.csock_connect(int fd, struct sockaddr *uservaddr, int addrlen)
fd611net/socket.cPRINTK("sys_connect: fd = %d\n", fd);
fd612net/socket.cif (!(sock = sockfd_lookup(fd, &file)))
fd627net/socket.csock_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len)
fd631net/socket.cPRINTK("sys_getsockname: fd = %d\n", fd);
fd632net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd638net/socket.csock_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len)
fd642net/socket.cPRINTK("sys_getpeername: fd = %d\n", fd);
fd643net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd652net/socket.csys_send( int fd, void * buff, int len, unsigned flags)
fd658net/socket.cfd, buff, len, flags);
fd660net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd663net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd672net/socket.csys_sendto( int fd, void * buff, int len, unsigned flags,
fd679net/socket.c" addr=%X, alen = %d\n", fd, buff, len, flags, addr, addr_len);
fd681net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd684net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd695net/socket.csys_recv( int fd, void * buff, int len, unsigned flags)
fd701net/socket.cfd, buff, len, flags);
fd703net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd706net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd715net/socket.csys_recvfrom( int fd, void * buff, int len, unsigned flags,
fd722net/socket.c" addr=%X, alen=%X\n", fd, buff, len, flags, addr, addr_len);
fd724net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd727net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd738net/socket.csys_setsockopt (int fd, int level, int optname, char *optval, int optlen)
fd743net/socket.cPRINTK ("sys_setsockopt(fd=%d, level=%d, optname=%d,\n",fd, level,
fd747net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd750net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd758net/socket.csys_getsockopt (int fd, int level, int optname, char *optval, int *optlen)
fd762net/socket.cPRINTK ("sys_getsockopt(fd=%d, level=%d, optname=%d,\n",fd, level,
fd766net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd769net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd779net/socket.csys_shutdown( int fd, int how)
fd784net/socket.cPRINTK("sys_shutdown (fd = %d, how = %d)\n",fd, how);
fd786net/socket.cfile = current->filp[fd];
fd787net/socket.cif (fd < 0 || fd >= NR_OPEN || file == NULL)
fd790net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))