From 44b6aa4c8b8c6be883f892e9ee3980afb9c12888 Mon Sep 17 00:00:00 2001 From: wiz Date: Wed, 16 Apr 2003 12:53:37 +0000 Subject: [PATCH] Mostly mdoc improvements, some typos. --- lib/libutil/getmntopts.3 | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/libutil/getmntopts.3 b/lib/libutil/getmntopts.3 index 9450b77721cb..615de31ded33 100644 --- a/lib/libutil/getmntopts.3 +++ b/lib/libutil/getmntopts.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getmntopts.3,v 1.3 2003/04/11 17:37:28 christos Exp $ +.\" $NetBSD: getmntopts.3,v 1.4 2003/04/16 12:53:37 wiz Exp $ .\" .\" Copyright (c) 1994 .\" The Regents of the University of California. All rights reserved. @@ -73,15 +73,15 @@ or field of the option's table entry) are updated. The flag words are not initialized by -.Fn getmntopt . +.Fn getmntopts . The table, .Ar mopts , has the following format: .Bd -literal struct mntopt { const char *m_option; /* option name */ - int m_inverse; /* is this a negative option, eg "dev" */ - int m_flag; /* bit to set, eg MNT_RDONLY */ + int m_inverse; /* is this a negative option, e.g., "dev" */ + int m_flag; /* bit to set, e.g., MNT_RDONLY */ int m_altloc; /* non-zero to use altflagp rather than flagp */ }; .Ed @@ -153,10 +153,10 @@ was set it the option string. The .Fn getmntoptnum returns the long value of the named option, if such a value was set it the -option string. It prints an error message and exits if the value was not +option string. +It prints an error message and exits if the value was not set, or could not be converted from a string to a long. .Pp -r The .Fn freemntopts frees the storage used by @@ -191,20 +191,26 @@ freemntopts(mp); .Ed .Sh RETURN VALUE .Fn getmntopts -returns NULL if an error occured. +returns +.Dv NULL +if an error occured. .Fn getmntoptstr -returns NULL if the option does not have an argument, or the option string. +returns +.Dv NULL +if the option does not have an argument, or the option string. .Fn getmntoptnum -returns -1 if an error occured and the getmnt_silent is set. +returns \-1 if an error occured and +.Va getmnt_silent +is set. .Sh DIAGNOSTICS If the external integer variable -.Dv getmnt_silent +.Va getmnt_silent is non-zero then the .Fn getmntopts function displays an error message and exits if an unrecognized option is encountered. By default -.Dv getmnt_silent +.Va getmnt_silent is zero. .Sh SEE ALSO .Xr err 3 ,