Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 1998 22:35:58 +0200 (CEST)
From:      Stefan Eggers <seggers@semyam.dinoco.de>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Cc:        seggers@semyam.dinoco.de
Subject:   docs/6753: getvfsent(3) example is out of date
Message-ID:  <199805252035.WAA05584@semyam.dinoco.de>

next in thread | raw e-mail | index | archive | help

>Number:         6753
>Category:       docs
>Synopsis:       getvfsent(3) example is out of date
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 25 13:40:00 PDT 1998
>Last-Modified:
>Originator:     Stefan Eggers
>Organization:
none
>Release:        FreeBSD 2.2.6-STABLE i386
>Environment:

>Description:

	The example used in the man page to getvfsent(3) is taken from
the source of mount_cd9660(8).  Unfortunately this source changed a
bit since the inclusion so this example is a bit out of date.

	There is also a mentioning about the odd conditional
expression in the mount call below the example.  As the new code works
w/o this it is not applicable and should get removed.

>How-To-Repeat:

	Just read the example in the man page of getvfsent(3) and the
source of mount_cd9660(8) and compare the corresponding parts.

>Fix:
	
	I fixed this problem by just copying over the new code and
changing the formatting a bit so that the indention style is unchanged
from the old example.

	The above mentioned obsolete paragraph about the condicitional
expression I just removed as it is not applicable anymore.

*** getvfsent.3.ORIG	Fri Feb 28 06:49:18 1997
--- getvfsent.3	Mon May 25 22:09:55 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,157 ----
  
  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);
  
  .Sh RETURN VALUES
  The
  .Fn getvfsbyname ,
>Audit-Trail:
>Unformatted:

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?199805252035.WAA05584>