Changeset View
Changeset View
Standalone View
Standalone View
lib/libbe/libbe.3
Show All 21 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 16, 2019 | .Dd July 22, 2020 | ||||
.Dt LIBBE 3 | .Dt LIBBE 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm libbe | .Nm libbe | ||||
.Nd library for creating, destroying and modifying ZFS boot environments | .Nd library for creating, destroying and modifying ZFS boot environments | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libbe | .Lb libbe | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
Show All 34 Lines | |||||
.Ft int | .Ft int | ||||
.Fn be_create_from_existing_snap "libbe_handle_t *hdl" "const char *be_name" "const char *snap" | .Fn be_create_from_existing_snap "libbe_handle_t *hdl" "const char *be_name" "const char *snap" | ||||
.Pp | .Pp | ||||
.Ft int | .Ft int | ||||
.Fn be_rename "libbe_handle_t *hdl" "const char *be_old" "const char *be_new" | .Fn be_rename "libbe_handle_t *hdl" "const char *be_old" "const char *be_new" | ||||
.Pp | .Pp | ||||
.Ft int | .Ft int | ||||
.Fn be_activate "libbe_handle_t *hdl" "const char *be_name" "bool temporary" | .Fn be_activate "libbe_handle_t *hdl" "const char *be_name" "bool temporary" | ||||
.Pp | |||||
.Ft int | .Ft int | ||||
.Fn be_deactivate "libbe_handle_t *hdl" "const char *be_name" "bool temporary" | |||||
.Pp | |||||
.Ft int | |||||
.Fn be_destroy "libbe_handle_t *hdl" "const char *be_name" "int options" | .Fn be_destroy "libbe_handle_t *hdl" "const char *be_name" "int options" | ||||
.Pp | .Pp | ||||
.Ft void | .Ft void | ||||
.Fn be_nicenum "uint64_t num" "char *buf" "size_t bufsz" | .Fn be_nicenum "uint64_t num" "char *buf" "size_t bufsz" | ||||
.Pp | .Pp | ||||
.\" TODO: Write up of mount options | .\" TODO: Write up of mount options | ||||
.\" typedef enum { | .\" typedef enum { | ||||
.\" BE_MNT_FORCE = 1 << 0, | .\" BE_MNT_FORCE = 1 << 0, | ||||
▲ Show 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn be_activate | .Fn be_activate | ||||
function makes a boot environment active on the next boot. | function makes a boot environment active on the next boot. | ||||
If the | If the | ||||
.Fa temporary | .Fa temporary | ||||
flag is set, then it will be active for the next boot only, as done by | flag is set, then it will be active for the next boot only, as done by | ||||
.Xr zfsbootcfg 8 . | .Xr zfsbootcfg 8 . | ||||
Next boot functionality is currently only available when booting in x86 BIOS | .Pp | ||||
mode. | The | ||||
.Fn be_deactivate | |||||
function deactivates a boot environment. | |||||
If the | |||||
.Fa temporary | |||||
flag is set, then it will cause removal of boot once configuration, set by | |||||
.Fn be_activate | |||||
function or by | |||||
.Xr zfsbootcfg 8 . | |||||
If the | |||||
.Fa temporary | |||||
flag is not set, | |||||
.Fn be_deactivate | |||||
function will set zfs | |||||
.Dv canmount | |||||
property to | |||||
.Dv noauto . | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn be_destroy | .Fn be_destroy | ||||
function will recursively destroy the given boot environment. | function will recursively destroy the given boot environment. | ||||
It will not destroy a mounted boot environment unless the | It will not destroy a mounted boot environment unless the | ||||
.Dv BE_DESTROY_FORCE | .Dv BE_DESTROY_FORCE | ||||
option is set in | option is set in | ||||
.Fa options . | .Fa options . | ||||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |