diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-06-04 02:25:24 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-06-04 02:25:24 +0000 |
commit | b3bf4767c9616e9ca4cee7ff3425f0cc8dca57b8 (patch) | |
tree | f5dd4eebbce00eda7b5fbda51195e0cb4b42ef94 /share/man/man9 | |
parent | d850e5703f3d4386b72c462ab55a9f6afb596804 (diff) |
Bring man page closer to current reality.
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/disklabel.9 | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/share/man/man9/disklabel.9 b/share/man/man9/disklabel.9 index 0c013fd1b23..5432d519d14 100644 --- a/share/man/man9/disklabel.9 +++ b/share/man/man9/disklabel.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: disklabel.9,v 1.13 2008/06/26 05:42:08 ray Exp $ +.\" $OpenBSD: disklabel.9,v 1.14 2011/06/04 02:25:23 krw Exp $ .\" $NetBSD: disklabel.9,v 1.7 1999/03/06 22:09:29 mycroft Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 26 2008 $ +.Dd $Mdocdate: June 4 2011 $ .Dt DISKLABEL 9 .Os .Sh NAME @@ -41,14 +41,14 @@ .Sh SYNOPSIS .Fd #include <sys/param.h> .Fd #include <sys/disklabel.h> -.Ft char * +.Ft int .Fn readdisklabel "dev_t dev" "void (*strat)(struct buf *)" "struct disklabel *lp" "int spoofonly" .Ft int .Fn writedisklabel "dev_t dev" "void (*strat)(struct buf *)" "struct disklabel *lp" .Ft int .Fn setdisklabel "struct disklabel *olp" "struct disklabel *nlp" "u_int openmask" .Ft int -.Fn bounds_check_with_label "struct buf *bp" "struct disklabel *lp" "int wlabel" +.Fn bounds_check_with_label "struct buf *bp" "struct disklabel *lp" .Sh DESCRIPTION This collection of routines provides a disklabel management interface to kernel device drivers. @@ -82,11 +82,8 @@ If the medium does not contain a native disklabel that can be read in directly or .Fa spoofonly argument is a true value, -If a disk label can not be found or constructed, a string containing -an approximated description of the failure mode is returned. -Otherwise the -.Dv NULL -string is returned. +If a disk label is found or can be constructed a value of 0 is returned. +Otherwise the value of the I/O errno encountered is returned. .Pp .Fn writedisklabel stores disk label information contained in the disk label structure given by @@ -145,29 +142,7 @@ and sets the .Dv B_ERROR flag in .Dq Va b_flags . -If the argument -.Fa wlabel -is zero, and the transfer is a write operation, a check is done if the transfer -would overwrite -.Pq a portion of -the disklabel area on the medium. -If that is the case, -.Dv EROFS -is set in -.Dq Va b_error -and the -.Dv B_ERROR -flag is set in -.Dq Va b_flags . -Note that -.Fa wlabel -should be set to a non-zero value if the intended operation is expected to -install or update the disk label. -Programs that intend to do so using the raw device interface should notify -the driver by using a -.Dv DIOCWLABEL -ioctl function. -A zero value is returned if any of the bound checks failed or +A value of -1 is returned if any of the bound checks failed or transfer was attempted exactly at the end of disk partition. Otherwise the value of 1 is returned. .Sh SEE ALSO |