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);
fd48fs/ioctl.cint sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
fd52fs/ioctl.cif (fd >= NR_OPEN || !(filp = current->filp[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;
fd206fs/pipe.cint fd[2];
fd220fs/pipe.ccurrent->filp[ fd[j]=i ] = f[j];
fd224fs/pipe.ccurrent->filp[fd[0]]=NULL;
fd231fs/pipe.ccurrent->filp[fd[0]] = NULL;
fd232fs/pipe.ccurrent->filp[fd[1]] = NULL;
fd244fs/pipe.cput_fs_long(fd[0],0+fildes);
fd245fs/pipe.cput_fs_long(fd[1],1+fildes);
fd53fs/proc/fd.cunsigned int ino, pid, fd, c;
fd83fs/proc/fd.cfd = 0;
fd88fs/proc/fd.cfd = 0xfffff;
fd91fs/proc/fd.cfd *= 10;
fd92fs/proc/fd.cfd += c;
fd93fs/proc/fd.cif (fd & 0xffff0000) {
fd94fs/proc/fd.cfd = 0xfffff;
fd104fs/proc/fd.cif (fd >= NR_OPEN || !p->filp[fd] || !p->filp[fd]->f_inode)
fd106fs/proc/fd.cino = (pid << 16) + 0x100 + fd;
fd108fs/proc/fd.cif (fd >= p->numlibraries)
fd110fs/proc/fd.cino = (pid << 16) + 0x200 + fd;
fd121fs/proc/fd.cunsigned int fd, pid, ino;
fd133fs/proc/fd.cfd = filp->f_pos;
fd135fs/proc/fd.cif (fd < 2) {
fd136fs/proc/fd.ci = j = fd+1;
fd137fs/proc/fd.cif (!fd)
fd138fs/proc/fd.cfd = inode->i_ino;
fd140fs/proc/fd.cfd = (inode->i_ino & 0xffff0000) | 2;
fd141fs/proc/fd.cput_fs_long(fd, &dirent->d_ino);
fd148fs/proc/fd.cfd -= 2;
fd155fs/proc/fd.cif (fd >= NR_OPEN)
fd157fs/proc/fd.cif (!p->filp[fd] || !p->filp[fd]->f_inode)
fd160fs/proc/fd.cif (fd >= p->numlibraries)
fd164fs/proc/fd.cwhile (fd >= j) {
fd170fs/proc/fd.cino = (pid << 16) + 0x100 + fd;
fd172fs/proc/fd.cino = (pid << 16) + 0x200 + fd;
fd177fs/proc/fd.cput_fs_byte('0'+(fd % 10), i+dirent->d_name);
fd178fs/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)
fd44init/main.cstatic inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
fd45init/main.cstatic inline _syscall1(int,dup,int,fd)
fd48init/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)
fd89mm/mmap.cint prot, flags, fd;
fd97mm/mmap.cfd = (int)     get_fs_long(buffer+4);  /* object to map */
fd100mm/mmap.cif (fd >= NR_OPEN || fd < 0 || !(file = current->filp[fd]))
fd17net/socket.cextern int sys_close(int fd);
fd83net/socket.cint fd, i;
fd89net/socket.cfor (fd = 0; fd < NR_OPEN; ++fd)
fd90net/socket.cif (!current->filp[fd])
fd92net/socket.cif (fd == NR_OPEN)
fd94net/socket.ccurrent->close_on_exec &= ~(1 << fd);
fd100net/socket.ccurrent->filp[fd] = file;
fd107net/socket.creturn fd;
fd116net/socket.ctoss_fd(int fd)
fd118net/socket.ccurrent->filp[fd]->f_inode = NULL;  /* safe from iput */
fd119net/socket.csys_close(fd);
fd134net/socket.csockfd_lookup(int fd, struct file **pfile)
fd138net/socket.cif (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd]))
fd396net/socket.cint i, fd;
fd443net/socket.cif ((fd = get_fd(SOCK_INODE(sock))) < 0) {
fd448net/socket.creturn fd;
fd502net/socket.csock_bind(int fd, struct sockaddr *umyaddr, int addrlen)
fd507net/socket.cPRINTK("sys_bind: fd = %d\n", fd);
fd508net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd523net/socket.csock_listen(int fd, int backlog)
fd527net/socket.cPRINTK("sys_listen: fd = %d\n", fd);
fd528net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd549net/socket.csock_accept(int fd, struct sockaddr *upeer_sockaddr, int *upeer_addrlen)
fd555net/socket.cPRINTK("sys_accept: fd = %d\n", fd);
fd556net/socket.cif (!(sock = sockfd_lookup(fd, &file)))
fd578net/socket.cif ((fd = get_fd(SOCK_INODE(newsock))) < 0) {
fd586net/socket.csys_close (fd);
fd597net/socket.creturn fd;
fd604net/socket.csock_connect(int fd, struct sockaddr *uservaddr, int addrlen)
fd610net/socket.cPRINTK("sys_connect: fd = %d\n", fd);
fd611net/socket.cif (!(sock = sockfd_lookup(fd, &file)))
fd626net/socket.csock_getsockname(int fd, struct sockaddr *usockaddr, int *usockaddr_len)
fd630net/socket.cPRINTK("sys_getsockname: fd = %d\n", fd);
fd631net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd637net/socket.csock_getpeername(int fd, struct sockaddr *usockaddr, int *usockaddr_len)
fd641net/socket.cPRINTK("sys_getpeername: fd = %d\n", fd);
fd642net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd651net/socket.csys_send( int fd, void * buff, int len, unsigned flags)
fd657net/socket.cfd, buff, len, flags);
fd659net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd662net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd671net/socket.csys_sendto( int fd, void * buff, int len, unsigned flags,
fd678net/socket.c" addr=%X, alen = %d\n", fd, buff, len, flags, addr, addr_len);
fd680net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd683net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd694net/socket.csys_recv( int fd, void * buff, int len, unsigned flags)
fd700net/socket.cfd, buff, len, flags);
fd702net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd705net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd714net/socket.csys_recvfrom( int fd, void * buff, int len, unsigned flags,
fd721net/socket.c" addr=%X, alen=%X\n", fd, buff, len, flags, addr, addr_len);
fd723net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd726net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd737net/socket.csys_setsockopt (int fd, int level, int optname, char *optval, int optlen)
fd742net/socket.cPRINTK ("sys_setsockopt(fd=%d, level=%d, optname=%d,\n",fd, level,
fd746net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd749net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd757net/socket.csys_getsockopt (int fd, int level, int optname, char *optval, int *optlen)
fd761net/socket.cPRINTK ("sys_getsockopt(fd=%d, level=%d, optname=%d,\n",fd, level,
fd765net/socket.cif (fd < 0 || fd >= NR_OPEN ||   ((file = current->filp[fd]) == NULL))
fd768net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))
fd778net/socket.csys_shutdown( int fd, int how)
fd783net/socket.cPRINTK("sys_shutdown (fd = %d, how = %d)\n",fd, how);
fd785net/socket.cfile = current->filp[fd];
fd786net/socket.cif (fd < 0 || fd >= NR_OPEN || file == NULL)
fd789net/socket.cif (!(sock = sockfd_lookup(fd, NULL)))