[BACK]Return to fdesc_vnops.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / miscfs / fdesc

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/miscfs/fdesc/fdesc_vnops.c between version 1.31 and 1.32

version 1.31, 1996/02/13 13:12:52 version 1.32, 1996/04/11 11:24:29
Line 55 
Line 55 
 #include <sys/filedesc.h>  #include <sys/filedesc.h>
 #include <sys/vnode.h>  #include <sys/vnode.h>
 #include <sys/malloc.h>  #include <sys/malloc.h>
   #include <sys/conf.h>
 #include <sys/file.h>  #include <sys/file.h>
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/mount.h>  #include <sys/mount.h>
Line 184  struct vnodeopv_desc fdesc_vnodeop_opv_d
Line 185  struct vnodeopv_desc fdesc_vnodeop_opv_d
 void  void
 fdesc_init()  fdesc_init()
 {  {
           int cttymajor;
   
         devctty = makedev(nchrdev, 0);          /* locate the major number */
           for (cttymajor = 0; cttymajor < nchrdev; cttymajor++)
                   if (cdevsw[cttymajor].d_open == cttyopen)
                           break;
           devctty = makedev(cttymajor, 0);
         fdhashtbl = hashinit(NFDCACHE, M_CACHE, &fdhash);          fdhashtbl = hashinit(NFDCACHE, M_CACHE, &fdhash);
 }  }
   
Line 308  fdesc_lookup(v)
Line 314  fdesc_lookup(v)
                         if (error)                          if (error)
                                 goto bad;                                  goto bad;
                         *vpp = fvp;                          *vpp = fvp;
                         fvp->v_type = VFIFO;                          fvp->v_type = VCHR;
                         VOP_LOCK(fvp);                          VOP_LOCK(fvp);
                         return (0);                          return (0);
                 }                  }
Line 511  fdesc_getattr(v)
Line 517  fdesc_getattr(v)
                 case Flink:                  case Flink:
                         vap->va_mode = R_ALL|X_ALL;                          vap->va_mode = R_ALL|X_ALL;
                         vap->va_type = VLNK;                          vap->va_type = VLNK;
                           vap->va_rdev = 0;
                         vap->va_nlink = 1;                          vap->va_nlink = 1;
                         vap->va_size = strlen(VTOFDESC(vp)->fd_link);                          vap->va_size = strlen(VTOFDESC(vp)->fd_link);
                         break;                          break;
   
                 case Fctty:                  case Fctty:
                         vap->va_mode = R_ALL|W_ALL;                          vap->va_mode = R_ALL|W_ALL;
                         vap->va_type = VFIFO;                          vap->va_type = VCHR;
                           vap->va_rdev = devctty;
                         vap->va_nlink = 1;                          vap->va_nlink = 1;
                         vap->va_size = 0;                          vap->va_size = 0;
                         break;                          break;
Line 525  fdesc_getattr(v)
Line 533  fdesc_getattr(v)
                 default:                  default:
                         vap->va_mode = R_ALL|X_ALL;                          vap->va_mode = R_ALL|X_ALL;
                         vap->va_type = VDIR;                          vap->va_type = VDIR;
                           vap->va_rdev = 0;
                         vap->va_nlink = 2;                          vap->va_nlink = 2;
                         vap->va_size = DEV_BSIZE;                          vap->va_size = DEV_BSIZE;
                         break;                          break;
Line 539  fdesc_getattr(v)
Line 548  fdesc_getattr(v)
                 vap->va_ctime = vap->va_mtime;                  vap->va_ctime = vap->va_mtime;
                 vap->va_gen = 0;                  vap->va_gen = 0;
                 vap->va_flags = 0;                  vap->va_flags = 0;
                 vap->va_rdev = 0;  
                 vap->va_bytes = 0;                  vap->va_bytes = 0;
                 break;                  break;
   

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

CVSweb <webmaster@jp.NetBSD.org>