diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-12-23 08:25:32 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-12-23 08:25:32 +0000 |
commit | df3682e35f5d5f313608931e6b1c33164f3ef445 (patch) | |
tree | a8dd2b171f6d4c621b1f7d21fff3069f65d60977 /lib | |
parent | 69e47e029bbeeb836d456749beff6c0313e9509e (diff) |
add readlabelfs.3
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libutil/Makefile | 4 | ||||
-rw-r--r-- | lib/libutil/readlabelfs.3 | 59 |
2 files changed, 61 insertions, 2 deletions
diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 43336743948..c2cec01836b 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 1996/12/08 15:22:34 downsj Exp $ +# $OpenBSD: Makefile,v 1.11 1996/12/23 08:25:30 downsj Exp $ # $NetBSD: Makefile,v 1.8 1996/05/16 07:03:28 thorpej Exp $ LIB= util @@ -10,7 +10,7 @@ SRCS= getmaxpartitions.c getrawpartition.c login.c login_tty.c logout.c \ # XXX need login_fbtab.3 MAN= getmaxpartitions.3 getrawpartition.3 login.3 opendev.3 openpty.3 \ - pw_init.3 pw_lock.3 scsi.3 + pw_init.3 pw_lock.3 readlabelfs.3 scsi.3 MLINKS+=login.3 logout.3 MLINKS+=login.3 logwtmp.3 diff --git a/lib/libutil/readlabelfs.3 b/lib/libutil/readlabelfs.3 new file mode 100644 index 00000000000..4b95fa7acc4 --- /dev/null +++ b/lib/libutil/readlabelfs.3 @@ -0,0 +1,59 @@ +.\" $OpenBSD: readlabelfs.3,v 1.1 1996/12/23 08:25:31 downsj Exp $ +.\" +.\" Copyright (c) 1996, Jason Downs. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd December 22, 1996 +.Dt READLABELFS 3 +.Os +.Sh NAME +.Nm readlabelfs +.Nd read disklabel filesystem type +.Sh SYNOPSIS +.Fd #include <util.h> +.Ft char * +.Fn readlabelfs "char *device" "int verbose" +.Sh DESCRIPTION +The +.Fn readlabelfs +function attempts to determine the filesystem type of the disk +partition specified by +.Ar device +and returns it in a short form that can be easily used to construct +arguments within +.Xr mount 8 +and similar high-level filesystem utilties. +.Pp +If the +.Ar verbose +argument is not 0, +.Fn readlabelfs +will print appropiate error messages before returning. Otherwise, it +produces no output on the terminal. +.Pp +.Sh RETURN VALUES +.Fn readlabelfs +returns NULL upon error, or a valid filesystem type upon success. +.Sh HISTORY +.Fn readlabelfs +first appeared in OpenBSD 2.0. |