From 1a672d9c1e76675ce28342ac4740e3446231fe04 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 14 Nov 2020 15:21:20 +0000 Subject: [PATCH] MFC r366820-r366821: libbe(3) documentation improvements r366820: libbe(3): document be_snapshot() While toying around with lua bindings for libbe(3), I discovered that I apparently never documented this, despite having documented be_is_auto_snapshot_name that references it. r366821: libbe(3): install MLINKS for all of the functions provided --- lib/libbe/Makefile | 35 ++++++++++++++++++++++++ lib/libbe/libbe.3 | 27 ++++++++++++++++++ tools/build/mk/OptionalObsoleteFiles.inc | 35 ++++++++++++++++++++++++ 3 files changed, 97 insertions(+) diff --git a/lib/libbe/Makefile b/lib/libbe/Makefile index 9d2dc04918d..89917f969cb 100644 --- a/lib/libbe/Makefile +++ b/lib/libbe/Makefile @@ -12,6 +12,41 @@ SHLIB_MINOR= 0 SRCS= be.c be_access.c be_error.c be_info.c INCS= be.h MAN= libbe.3 +MLINKS+= libbe.3 be_activate.3 +MLINKS+= libbe.3 be_active_name.3 +MLINKS+= libbe.3 be_active_path.3 +MLINKS+= libbe.3 be_create_depth.3 +MLINKS+= libbe.3 be_create_from_existing_snap.3 +MLINKS+= libbe.3 be_create_from_existing.3 +MLINKS+= libbe.3 be_create.3 +MLINKS+= libbe.3 be_deactivate.3 +MLINKS+= libbe.3 be_destroy.3 +MLINKS+= libbe.3 be_exists.3 +MLINKS+= libbe.3 be_export.3 +MLINKS+= libbe.3 be_get_bootenv_props.3 +MLINKS+= libbe.3 be_get_dataset_props.3 +MLINKS+= libbe.3 be_get_dataset_snapshots.3 +MLINKS+= libbe.3 be_import.3 +MLINKS+= libbe.3 be_is_auto_snapshot_name.3 +MLINKS+= libbe.3 be_mount.3 +MLINKS+= libbe.3 be_mounted_at.3 +MLINKS+= libbe.3 be_nextboot_name.3 +MLINKS+= libbe.3 be_nextboot_path.3 +MLINKS+= libbe.3 be_nicenum.3 +MLINKS+= libbe.3 be_prop_list_alloc.3 +MLINKS+= libbe.3 be_prop_list_free.3 +MLINKS+= libbe.3 be_rename.3 +MLINKS+= libbe.3 be_root_concat.3 +MLINKS+= libbe.3 be_root_path.3 +MLINKS+= libbe.3 be_snapshot.3 +MLINKS+= libbe.3 be_unmount.3 +MLINKS+= libbe.3 be_validate_name.3 +MLINKS+= libbe.3 be_validate_snap.3 +MLINKS+= libbe.3 libbe_close.3 +MLINKS+= libbe.3 libbe_errno.3 +MLINKS+= libbe.3 libbe_error_description.3 +MLINKS+= libbe.3 libbe_init.3 +MLINKS+= libbe.3 libbe_print_on_error.3 WARNS?= 2 IGNORE_PRAGMA= yes diff --git a/lib/libbe/libbe.3 b/lib/libbe/libbe.3 index 0a93b30dbcb..1e311b164f7 100644 --- a/lib/libbe/libbe.3 +++ b/lib/libbe/libbe.3 @@ -58,6 +58,9 @@ .Ft const char * Ns .Fn be_root_path "libbe_handle_t *hdl" .Pp +.Ft int Ns +.Fn be_snapshot "libbe_handle_t *hdl" "const char *be_name" "const char *snap_name" "bool recursive" "char *result" +.Pp .Ft bool Ns .Fn be_is_auto_snapshot_name "libbe_handle_t *hdl" "const char *snap" .Pp @@ -216,6 +219,30 @@ The function returns the boot environment root path. .Pp The +.Fn be_snapshot +function creates a snapshot of +.Fa be_name +named +.Fa snap_name . +A +.Dv NULL +.Fa snap_name +may be used, indicating that +.Fn be_snaphot +should derive the snapshot name from the current date and time. +If +.Fa recursive +is set, then +.Fn be_snapshot +will recursively snapshot the dataset. +If +.Fa result +is not +.Dv NULL , +then it will be populated with the final +.Dq Fa be_name Ns @ Ns Fa snap_name . +.Pp +The .Fn be_is_auto_snapshot_name function is used to determine if the given snapshot name matches the format that the diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index c922e5867a7..6793151a32e 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1394,6 +1394,41 @@ OLD_LIBS+=usr/lib32/libzpool.so.2 OLD_FILES+=usr/sbin/zfsd OLD_FILES+=usr/sbin/zhack OLD_FILES+=usr/sbin/zdb +OLD_FILES+=usr/share/man/man3/be_activate.3.gz +OLD_FILES+=usr/share/man/man3/be_active_name.3.gz +OLD_FILES+=usr/share/man/man3/be_active_path.3.gz +OLD_FILES+=usr/share/man/man3/be_create_depth.3.gz +OLD_FILES+=usr/share/man/man3/be_create_from_existing_snap.3.gz +OLD_FILES+=usr/share/man/man3/be_create_from_existing.3.gz +OLD_FILES+=usr/share/man/man3/be_create.3.gz +OLD_FILES+=usr/share/man/man3/be_deactivate.3.gz +OLD_FILES+=usr/share/man/man3/be_destroy.3.gz +OLD_FILES+=usr/share/man/man3/be_exists.3.gz +OLD_FILES+=usr/share/man/man3/be_export.3.gz +OLD_FILES+=usr/share/man/man3/be_get_bootenv_props.3.gz +OLD_FILES+=usr/share/man/man3/be_get_dataset_props.3.gz +OLD_FILES+=usr/share/man/man3/be_get_dataset_snapshots.3.gz +OLD_FILES+=usr/share/man/man3/be_import.3.gz +OLD_FILES+=usr/share/man/man3/be_is_auto_snapshot_name.3.gz +OLD_FILES+=usr/share/man/man3/be_mount.3.gz +OLD_FILES+=usr/share/man/man3/be_mounted_at.3.gz +OLD_FILES+=usr/share/man/man3/be_nextboot_name.3.gz +OLD_FILES+=usr/share/man/man3/be_nextboot_path.3.gz +OLD_FILES+=usr/share/man/man3/be_nicenum.3.gz +OLD_FILES+=usr/share/man/man3/be_prop_list_alloc.3.gz +OLD_FILES+=usr/share/man/man3/be_prop_list_free.3.gz +OLD_FILES+=usr/share/man/man3/be_rename.3.gz +OLD_FILES+=usr/share/man/man3/be_root_concat.3.gz +OLD_FILES+=usr/share/man/man3/be_root_path.3.gz +OLD_FILES+=usr/share/man/man3/be_snapshot.3.gz +OLD_FILES+=usr/share/man/man3/be_unmount.3.gz +OLD_FILES+=usr/share/man/man3/be_validate_name.3.gz +OLD_FILES+=usr/share/man/man3/be_validate_snap.3.gz +OLD_FILES+=usr/share/man/man3/libbe_close.3.gz +OLD_FILES+=usr/share/man/man3/libbe_errno.3.gz +OLD_FILES+=usr/share/man/man3/libbe_error_description.3.gz +OLD_FILES+=usr/share/man/man3/libbe_init.3.gz +OLD_FILES+=usr/share/man/man3/libbe_print_on_error.3.gz OLD_FILES+=usr/share/man/man3/libbe.3.gz OLD_FILES+=usr/share/man/man7/zpool-features.7.gz OLD_FILES+=usr/share/man/man8/bectl.8.gz -- 2.45.0