READLABELFS(3) BSD Programmer's Manual READLABELFS(3)
readlabelfs - read disklabel filesystem type
#include <util.h> const char * readlabelfs(const char *device, int verbose);
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 simi- lar 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.
readlabelfs() returns NULL upon error, or a valid filesystem type upon success.
readlabelfs() first appeared in OpenBSD 2.0. The two const qualifiers were added in MirBSD #11. MirBSD #10-current December 22, 2022 1