jcs's openbsd hax
openbsd
at jcs 62 lines 2.2 kB view raw
1.\" $OpenBSD: readlabelfs.3,v 1.9 2025/06/06 22:01:40 schwarze Exp $ 2.\" 3.\" Copyright (c) 1996, Jason Downs. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS 15.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, 18.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.Dd $Mdocdate: June 6 2025 $ 27.Dt READLABELFS 3 28.Os 29.Sh NAME 30.Nm readlabelfs 31.Nd read disklabel filesystem type 32.Sh SYNOPSIS 33.Lb libutil 34.In util.h 35.Ft char * 36.Fn readlabelfs "char *device" "int verbose" 37.Sh DESCRIPTION 38The 39.Fn readlabelfs 40function attempts to determine the filesystem type of the disk 41partition specified by 42.Fa device 43and returns it in a short form that can be easily used to construct 44arguments within 45.Xr mount 8 46and similar high-level filesystem utilities. 47.Pp 48If the 49.Fa verbose 50argument is not 0, 51.Fn readlabelfs 52will print appropriate error messages before returning. 53Otherwise, it produces no output on the terminal. 54.Sh RETURN VALUES 55.Fn readlabelfs 56returns 57.Dv NULL 58upon error, or a valid filesystem type upon success. 59.Sh HISTORY 60.Fn readlabelfs 61first appeared in 62.Ox 2.0 .