libbe.3 (f446c9482cbcd1235ed05597e7c8a0bb320d71fe) libbe.3 (ad99fea9045dd3daaeca3d2dd60fffecd2311826)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2017 Kyle Kneitinger
5.\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org>
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2017 Kyle Kneitinger
5.\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org>
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd August 18, 2020
28.Dd March 18, 2024
29.Dt LIBBE 3
30.Os
31.Sh NAME
32.Nm libbe
33.Nd library for creating, destroying and modifying ZFS boot environments
34.Sh LIBRARY
35.Lb libbe
36.Sh SYNOPSIS

--- 136 unchanged lines hidden (view full) ---

173.Vt "libbe_handle_t *"
174on success, or
175.Dv NULL
176on error.
177If a BE root is supplied,
178.Nm
179will only operate out of that pool and BE root.
180An error may occur if:
29.Dt LIBBE 3
30.Os
31.Sh NAME
32.Nm libbe
33.Nd library for creating, destroying and modifying ZFS boot environments
34.Sh LIBRARY
35.Lb libbe
36.Sh SYNOPSIS

--- 136 unchanged lines hidden (view full) ---

173.Vt "libbe_handle_t *"
174on success, or
175.Dv NULL
176on error.
177If a BE root is supplied,
178.Nm
179will only operate out of that pool and BE root.
180An error may occur if:
181.Bl -column
182.It /boot and / are not on the same filesystem and device,
183.It libzfs fails to initialize,
184.It The system has not been properly booted with a ZFS boot
181.Bl -bullet
182.It
183.Pa /boot
184and
185.Pa /
186are not on the same filesystem and device,
187.It
188libzfs fails to initialize,
189.It
190The system has not been properly booted with a ZFS boot
185environment,
191environment,
186.It Nm
192.It
193.Nm
187fails to open the zpool the active boot environment resides on, or
194fails to open the zpool the active boot environment resides on, or
188.It Nm
195.It
196.Nm
189fails to locate the boot environment that is currently mounted.
190.El
191.Pp
192The
193.Fn libbe_close
194function frees all resources previously acquired in
195.Fn libbe_init ,
196invalidating the handle in the process.

--- 24 unchanged lines hidden (view full) ---

221function returns the boot environment root path.
222.Pp
223The
224.Fn be_snapshot
225function creates a snapshot of
226.Fa be_name
227named
228.Fa snap_name .
197fails to locate the boot environment that is currently mounted.
198.El
199.Pp
200The
201.Fn libbe_close
202function frees all resources previously acquired in
203.Fn libbe_init ,
204invalidating the handle in the process.

--- 24 unchanged lines hidden (view full) ---

229function returns the boot environment root path.
230.Pp
231The
232.Fn be_snapshot
233function creates a snapshot of
234.Fa be_name
235named
236.Fa snap_name .
229A
237A value of
230.Dv NULL
238.Dv NULL
231.Fa snap_name
232may be used, indicating that
233.Fn be_snaphot
234should derive the snapshot name from the current date and time.
235If
236.Fa recursive
237is set, then
238.Fn be_snapshot
239will recursively snapshot the dataset.

--- 275 unchanged lines hidden (view full) ---

515exactly as specified by
516.Fn be_get_bootenv_props .
517.Pp
518The
519.Fn be_prop_list_free
520function will free the property list.
521.Sh DIAGNOSTICS
522Upon error, one of the following values will be returned:
239may be used, indicating that
240.Fn be_snaphot
241should derive the snapshot name from the current date and time.
242If
243.Fa recursive
244is set, then
245.Fn be_snapshot
246will recursively snapshot the dataset.

--- 275 unchanged lines hidden (view full) ---

522exactly as specified by
523.Fn be_get_bootenv_props .
524.Pp
525The
526.Fn be_prop_list_free
527function will free the property list.
528.Sh DIAGNOSTICS
529Upon error, one of the following values will be returned:
523.Bl -dash -offset indent -compact
530.Bl -bullet -offset indent -compact
524.It
525BE_ERR_SUCCESS
526.It
527BE_ERR_INVALIDNAME
528.It
529BE_ERR_EXISTS
530.It
531BE_ERR_NOENT

--- 45 unchanged lines hidden ---
531.It
532BE_ERR_SUCCESS
533.It
534BE_ERR_INVALIDNAME
535.It
536BE_ERR_EXISTS
537.It
538BE_ERR_NOENT

--- 45 unchanged lines hidden ---