Index Index for
Section 9
Index Alphabetical
listing for S
Bottom of page Bottom of
page

setdisklabel(9r)

NAME

setdisklabel - Disk: Sets a disk label

SYNOPSIS

int setdisklabel( register struct disklabel *old_lp, register struct disklabel *new_lp, u_int openmask );

ARGUMENTS

old_lp Specifies the old disklabel structure for the device. new_lp Specifies the new disklabel structure that contains the user's changes. openmask Specifies a bit mask in which each set bit represents an open partition and each cleared bit represents a partition that is not open.

DESCRIPTION

The setdisklabel interface sets the in-memory copy of the disklabel structure to the new values specified by the user. The DIOCWDINFO and DIOCSDINFO ioctl commands call setdisklabel to set the in-memory disk label and to check the validity of the new settings.

RETURN VALUES

Upon successful completion, setdisklabel returns the value zero (0). Otherwise, it returns EBUSY if: · The number of partitions in the new disklabel is less than the number of open partitions · A partition offset in the new disklabel is not equal to the corresponding partition offset in the old disklabel · The size of a new partition in the new disklabel is less than the size of the corresponding partition in the old disklabel

SEE ALSO

Data Structures: disklabel(9s) Kernel Interfaces: readdisklabel(9r), writedisklabel(9r)

Index Index for
Section 9
Index Alphabetical
listing for S
Top of page Top of
page