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

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

Diff for /src/sys/miscfs/kernfs/kernfs_vnops.c between version 1.117 and 1.118

version 1.117, 2006/03/01 12:38:32 version 1.118, 2006/03/14 20:47:52
Line 151  int nkern_dirs = 2;
Line 151  int nkern_dirs = 2;
 #endif  #endif
   
 int kernfs_try_fileop(kfstype, kfsfileop, void *, int);  int kernfs_try_fileop(kfstype, kfsfileop, void *, int);
   int kernfs_try_xread(kfstype, const struct kernfs_node *, char *,
       size_t, int);
 int kernfs_try_xwrite(kfstype, const struct kernfs_node *, char *,  int kernfs_try_xwrite(kfstype, const struct kernfs_node *, char *,
     size_t, int);      size_t, int);
   
   static int kernfs_default_xread(void *v);
 static int kernfs_default_xwrite(void *v);  static int kernfs_default_xwrite(void *v);
 static int kernfs_default_fileop_getattr(void *);  static int kernfs_default_fileop_getattr(void *);
   
 /* must include all fileop's */  /* must include all fileop's */
 const struct kernfs_fileop kernfs_default_fileops[] = {  const struct kernfs_fileop kernfs_default_fileops[] = {
     { .kf_fileop = KERNFS_XREAD },
   { .kf_fileop = KERNFS_XWRITE },    { .kf_fileop = KERNFS_XWRITE },
   { .kf_fileop = KERNFS_FILEOP_OPEN },    { .kf_fileop = KERNFS_FILEOP_OPEN },
   { .kf_fileop = KERNFS_FILEOP_GETATTR,    { .kf_fileop = KERNFS_FILEOP_GETATTR,
     .kf_genop = {kernfs_default_fileop_getattr} },      .kf_genop = {kernfs_default_fileop_getattr} },
   { .kf_fileop = KERNFS_FILEOP_IOCTL },    { .kf_fileop = KERNFS_FILEOP_IOCTL },
   { .kf_fileop = KERNFS_FILEOP_CLOSE },    { .kf_fileop = KERNFS_FILEOP_CLOSE },
     { .kf_fileop = KERNFS_FILEOP_READ, .kf_genop = {kernfs_default_xread} },
   { .kf_fileop = KERNFS_FILEOP_WRITE, .kf_genop = {kernfs_default_xwrite} },    { .kf_fileop = KERNFS_FILEOP_WRITE, .kf_genop = {kernfs_default_xwrite} },
 };  };
   
Line 910  kernfs_setattr(v)
Line 915  kernfs_setattr(v)
 }  }
   
 int  int
 kernfs_read(v)  kernfs_default_xread(v)
         void *v;          void *v;
 {  {
         struct vop_read_args /* {          struct vop_read_args /* {
Line 940  kernfs_read(v)
Line 945  kernfs_read(v)
         return (error);          return (error);
 }  }
   
   int
   kernfs_read(v)
           void *v;
   {
           struct vop_read_args /* {
                   struct vnode *a_vp;
                   struct uio *a_uio;
                   int  a_ioflag;
                   struct ucred *a_cred;
           } */ *ap = v;
           struct kernfs_node *kfs = VTOKERN(ap->a_vp);
   
           return kernfs_try_fileop(kfs->kfs_type, KERNFS_FILEOP_READ, v, 0);
   }
   
 static int  static int
 kernfs_default_xwrite(v)  kernfs_default_xwrite(v)
         void *v;          void *v;

Legend:
Removed from v.1.117  
changed lines
  Added in v.1.118

CVSweb <webmaster@jp.NetBSD.org>