Re: nuking a vnode

1999-09-17 Thread Nick Hibma

  int major;
  dev_t dev;
  struct vnode *vp;
  
  major = ultp_cdevsw.d_maj;
  dev = makedev(major, self-dv_unit)
  vp = SLIST_FIRST(dev-si_hlist);

if (vfinddev(dev, VCHR, vp))
VOP_REVOKE(vp, REVOKEALL);

#if 0
  if (vp) {
   VOP_REVOKE(vp. REVOKEALL);
  }
#endif

  remove_dev(dev);

/* Good one! I had not yet thought about that one */

  3.3 will be considerably different.

Not one of my main concerns.

Nick

-- 
ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: nuking a vnode

1999-09-17 Thread Nick Hibma
  int major;
  dev_t dev;
  struct vnode *vp;
  
  major = ultp_cdevsw.d_maj;
  dev = makedev(major, self-dv_unit)
  vp = SLIST_FIRST(dev-si_hlist);

if (vfinddev(dev, VCHR, vp))
VOP_REVOKE(vp, REVOKEALL);

#if 0
  if (vp) {
   VOP_REVOKE(vp. REVOKEALL);
  }
#endif

  remove_dev(dev);

/* Good one! I had not yet thought about that one */

  3.3 will be considerably different.

Not one of my main concerns.

Nick

-- 
ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: nuking a vnode

1999-09-16 Thread Brian F. Feldman

On Thu, 16 Sep 1999, Nick Hibma wrote:

 
 How do I nuke vnodes? This is the NetBSD code that needs to be emulated:
 
 /* locate the major number */
 for (maj = 0; maj  nchrdev; maj++)
 if (cdevsw[maj].d_open == ulptopen)
 break;
 
 /* Nuke the vnodes for any open instances (calls close). */
 mn = self-dv_unit;
 vdevgone(maj, mn, mn, VCHR);
 

Did you try taking a look at VOP_REVOKE()? It seems to be what you're
looking for.

-- 
 Brian Fundakowski Feldman   /  "Any sufficiently advanced bug is\
 [EMAIL PROTECTED]   |   indistinguishable from a feature."  |
 FreeBSD: The Power to Serve!\-- Rich Kulawiec   /



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: nuking a vnode

1999-09-16 Thread Brian F. Feldman
On Thu, 16 Sep 1999, Nick Hibma wrote:

 
 How do I nuke vnodes? This is the NetBSD code that needs to be emulated:
 
 /* locate the major number */
 for (maj = 0; maj  nchrdev; maj++)
 if (cdevsw[maj].d_open == ulptopen)
 break;
 
 /* Nuke the vnodes for any open instances (calls close). */
 mn = self-dv_unit;
 vdevgone(maj, mn, mn, VCHR);
 

Did you try taking a look at VOP_REVOKE()? It seems to be what you're
looking for.

-- 
 Brian Fundakowski Feldman   /  Any sufficiently advanced bug is\
 gr...@freebsd.org   |   indistinguishable from a feature.  |
 FreeBSD: The Power to Serve!\-- Rich Kulawiec   /



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: nuking a vnode

1999-09-16 Thread Julian Elischer

On Thu, 16 Sep 1999, Nick Hibma wrote:

 
 How do I nuke vnodes? This is the NetBSD code that needs to be emulated:
 
 /* locate the major number */
 for (maj = 0; maj  nchrdev; maj++)
 if (cdevsw[maj].d_open == ulptopen)
 break;
 
 /* Nuke the vnodes for any open instances (calls close). */
 mn = self-dv_unit;
 vdevgone(maj, mn, mn, VCHR);

In -current something like:

int major;
dev_t dev;
struct vnode *vp;

major = ultp_cdevsw.d_maj;
dev = makedev(major, self-dv_unit)
vp = SLIST_FIRST(dev-si_hlist);
if (vp) {
VOP_REVOKE(vp. REVOKEALL);
}
remove_dev(dev);

3.3 will be considerably different.




To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: nuking a vnode

1999-09-16 Thread Julian Elischer


On Thu, 16 Sep 1999, Julian Elischer wrote:

 
 On Thu, 16 Sep 1999, Nick Hibma wrote:
 
  
  How do I nuke vnodes? This is the NetBSD code that needs to be emulated:
  
  /* locate the major number */
  for (maj = 0; maj  nchrdev; maj++)
  if (cdevsw[maj].d_open == ulptopen)
  break;
  
  /* Nuke the vnodes for any open instances (calls close). */
  mn = self-dv_unit;
  vdevgone(maj, mn, mn, VCHR);
 
 In -current something like:
 
 int major;
 dev_t dev;
 struct vnode *vp;
 
 major = ultp_cdevsw.d_maj;
 dev = makedev(major, self-dv_unit)
 vp = SLIST_FIRST(dev-si_hlist);
 if (vp) {
   VOP_REVOKE(vp. REVOKEALL);
 ^  comma (,)

 }
 remove_dev(dev);
 
 3.3 will be considerably different.
 
 
 
 
 To Unsubscribe: send mail to majord...@freebsd.org
 with unsubscribe freebsd-hackers in the body of the message
 



To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message