Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 1998 22:47:33 +0200
From:      Stefan Eggers <seggers@semyam.dinoco.de>
To:        FreeBSD-gnats-submit@FreeBSD.ORG, doc@FreeBSD.ORG
Cc:        seggers@semyam.dinoco.de
Subject:   Re: docs/6753: getvfsent(3) example is out of date 
Message-ID:  <199805252047.WAA05991@semyam.dinoco.de>
In-Reply-To: Your message of "Mon, 25 May 1998 13:40:01 PDT." <199805252040.NAA04053@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry!  I killed one line too much.  :-(  Here is the - hopefully
now correct - diff output:

*** getvfsent.3.ORIG	Fri Feb 28 06:49:18 1997
--- getvfsent.3	Mon May 25 22:39:13 1998
***************
*** 140,160 ****
  
  vfc = getvfsbyname("cd9660");
  if(!vfc && vfsisloadable("cd9660")) {
! 	if(vfsload("cd9660"))
! 		err(1, "vfsload(cd9660)");
! 	endvfsent();	/* flush cache */
  	vfc = getvfsbyname("cd9660");
  }
  
! mount(vfc ? vfc->vfc_index : MOUNT_CD9660, /* more arguments */
  
  .Ed
- The odd conditional in the call to
- .Xr mount 2
- is present for compatibility with old, non-LKM cognizant kernels, and
- will be removed (along with all vestiges of
- .Dv MOUNT_* )
- in a future release.
  .Sh RETURN VALUES
  The
  .Fn getvfsbyname ,
--- 140,158 ----
  
  vfc = getvfsbyname("cd9660");
  if(!vfc && vfsisloadable("cd9660")) {
! 	if(vfsload("cd9660")) {
! 		err(EX_OSERR, "vfsload(cd9660)");
! 	}
! 	endvfsent();    /* flush cache */
  	vfc = getvfsbyname("cd9660");
  }
+ if (!vfc)
+ 	errx(EX_OSERR, "cd9660 filesystem not available");
  
! if (mount(vfc->vfc_index, dir, mntflags, &args) < 0)
! 	err(EX_OSERR, "%s", dev);
  
  .Ed
  .Sh RETURN VALUES
  The
  .Fn getvfsbyname ,

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805252047.WAA05991>