1.\" $OpenBSD: readlabelfs.3,v 1.8 2013/06/05 03:40:26 tedu 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 5 2013 $ 27.Dt READLABELFS 3 28.Os 29.Sh NAME 30.Nm readlabelfs 31.Nd read disklabel filesystem type 32.Sh SYNOPSIS 33.In util.h 34.Ft char * 35.Fn readlabelfs "char *device" "int verbose" 36.Sh DESCRIPTION 37The 38.Fn readlabelfs 39function attempts to determine the filesystem type of the disk 40partition specified by 41.Fa device 42and returns it in a short form that can be easily used to construct 43arguments within 44.Xr mount 8 45and similar high-level filesystem utilities. 46.Pp 47If the 48.Fa verbose 49argument is not 0, 50.Fn readlabelfs 51will print appropriate error messages before returning. 52Otherwise, it produces no output on the terminal. 53.Sh RETURN VALUES 54.Fn readlabelfs 55returns 56.Dv NULL 57upon error, or a valid filesystem type upon success. 58.Sh HISTORY 59.Fn readlabelfs 60first appeared in 61.Ox 2.0 . 62