READLABELFS(3)

NAME
readlabelfs - read disklabel filesystem type

SYNOPSIS
#include <util.h>
char *
readlabelfs(char *device, int verbose);

DESCRIPTION
The readlabelfs() function attempts to determine the filesystem type of the disk partition specified by device and returns it in a short form that can be easily used to construct arguments within mount(8) and similar high-level filesystem utilities.

If the verbose argument is not 0, readlabelfs() will print appropriate error messages before returning. Otherwise, it produces no output on the terminal.

RETURN VALUES
readlabelfs() returns NULL upon error, or a valid filesystem type upon success.

HISTORY
readlabelfs() first appeared in OpenBSD 2.0.