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

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

Diff for /src/sys/miscfs/procfs/procfs_vnops.c between version 1.120 and 1.121

version 1.120, 2004/10/04 08:40:18 version 1.121, 2005/02/26 22:59:00
Line 454  procfs_print(v)
Line 454  procfs_print(v)
 }  }
   
 int  int
 procfs_link(v)  procfs_link(v)
         void *v;          void *v;
 {  {
         struct vop_link_args /* {          struct vop_link_args /* {
                 struct vnode *a_dvp;                  struct vnode *a_dvp;
                 struct vnode *a_vp;                  struct vnode *a_vp;
                 struct componentname *a_cnp;                  struct componentname *a_cnp;
         } */ *ap = v;          } */ *ap = v;
   
         VOP_ABORTOP(ap->a_dvp, ap->a_cnp);          VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
         vput(ap->a_dvp);          vput(ap->a_dvp);
         return (EROFS);          return (EROFS);
Line 479  procfs_symlink(v)
Line 479  procfs_symlink(v)
                 struct vattr *a_vap;                  struct vattr *a_vap;
                 char *a_target;                  char *a_target;
         } */ *ap = v;          } */ *ap = v;
   
         VOP_ABORTOP(ap->a_dvp, ap->a_cnp);          VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
         vput(ap->a_dvp);          vput(ap->a_dvp);
         return (EROFS);          return (EROFS);
Line 539  procfs_getattr(v)
Line 539  procfs_getattr(v)
         /*          /*
          * Make all times be current TOD.  Avoid microtime(9), it's slow.           * Make all times be current TOD.  Avoid microtime(9), it's slow.
          * We don't guard the read from time(9) with splclock(9) since we           * We don't guard the read from time(9) with splclock(9) since we
          * don't actually need to be THAT sure the access is atomic.           * don't actually need to be THAT sure the access is atomic.
          *           *
          * It would be possible to get the process start           * It would be possible to get the process start
          * time from the p_stat structure, but there's           * time from the p_stat structure, but there's
Line 769  procfs_access(v)
Line 769  procfs_access(v)
  *   *
  * Locking isn't hard here, just poorly documented.   * Locking isn't hard here, just poorly documented.
  *   *
  * If we're looking up ".", just vref the parent & return it.   * If we're looking up ".", just vref the parent & return it.
  *   *
  * If we're looking up "..", unlock the parent, and lock "..". If everything   * If we're looking up "..", unlock the parent, and lock "..". If everything
  * went ok, and we're on the last component and the caller requested the   * went ok, and we're on the last component and the caller requested the
Line 821  procfs_lookup(v)
Line 821  procfs_lookup(v)
                 /*                  /*
                  * Shouldn't get here with .. in the root node.                   * Shouldn't get here with .. in the root node.
                  */                   */
                 if (cnp->cn_flags & ISDOTDOT)                  if (cnp->cn_flags & ISDOTDOT)
                         return (EIO);                          return (EIO);
   
                 iscurproc = CNEQ(cnp, "curproc", 7);                  iscurproc = CNEQ(cnp, "curproc", 7);
Line 956  procfs_lookup(v)
Line 956  procfs_lookup(v)
   
                         VREF(fvp);                          VREF(fvp);
                         FILE_UNUSE(fp, p);                          FILE_UNUSE(fp, p);
                         vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY |                          vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY |
                             (p == curproc ? LK_CANRECURSE : 0));                              (p == curproc ? LK_CANRECURSE : 0));
                         *vpp = fvp;                          *vpp = fvp;
                         error = 0;                          error = 0;
Line 1127  procfs_readdir(v)
Line 1127  procfs_readdir(v)
                         if (pt->pt_valid &&                          if (pt->pt_valid &&
                             (*pt->pt_valid)(p, vp->v_mount) == 0)                              (*pt->pt_valid)(p, vp->v_mount) == 0)
                                 continue;                                  continue;
   
                         d.d_fileno = PROCFS_FILENO(pfs->pfs_pid,                          d.d_fileno = PROCFS_FILENO(pfs->pfs_pid,
                             pt->pt_pfstype, -1);                              pt->pt_pfstype, -1);
                         d.d_namlen = pt->pt_namlen;                          d.d_namlen = pt->pt_namlen;

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.121

CVSweb <webmaster@jp.NetBSD.org>