man.bsd.lv manual page server

Manual Page Search Parameters

GETLABELSECTOR(3) Library Functions Manual GETLABELSECTOR(3)

getlabelsector, getlabeloffset, getlabelusesmbrget disklabel location informations

library “libutil”

#include <util.h>

daddr_t
getlabelsector(void);

off_t
getlabeloffset(void);

int
getlabelusesmbr(void);

The () and () functions return values which describe the exact on-disk location of the disklabel(5) on the current system, or -1 on error. These functions supersede the hardcoded LABELSECTOR and LABELOFFSET definitions previously used to derive the location of the disklabel(5).

The () returns 1 if the disklabel is located inside a MBR partition, 0 if it's stored relative to the start of the disk, or -1 on error.

sysctl(3), disklabel(5)

The getlabelsector() and getlabeloffset() functions appeared in NetBSD 2.0.

August 25, 2011 NetBSD-9.2