aboutsummaryrefslogtreecommitdiff
path: root/lib/libbe/be_info.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-07-25 03:08:11 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-07-25 03:08:11 +0000
commitc3a34c08e09c24c9cadf309c393e019063e52616 (patch)
tree524d871a8f2f9c5718621a167a9b772095dac029 /lib/libbe/be_info.c
parent9e004b219ef0162c6ba861ac6b1f11bc6e318bdc (diff)
downloadsrc-c3a34c08e09c24c9cadf309c393e019063e52616.tar.gz
src-c3a34c08e09c24c9cadf309c393e019063e52616.zip
libbe(3): Disambiguate 'active' a little bit, add 'bootfs'
- Rename 'active' to 'rootfs', which is used in other places to describe the currently booted (or about to be booted) BE. - Add 'bootfs', which indicates the next boot environment to be booted. This is pulled from the BOOTFS zpool property. - Go ahead and keep an open handle to the active zpool. We might need to enumerate datasets, get properties, and set properties (e.g. bootfs) throughout other libbe bits, and a single handle isn't overly expensive.
Notes
Notes: svn path=/projects/bectl/; revision=336696
Diffstat (limited to 'lib/libbe/be_info.c')
-rw-r--r--lib/libbe/be_info.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libbe/be_info.c b/lib/libbe/be_info.c
index 747155916a95..93b327d6a6b2 100644
--- a/lib/libbe/be_info.c
+++ b/lib/libbe/be_info.c
@@ -43,7 +43,7 @@ static int prop_list_builder(prop_data_t *);
const char *
be_active_name(libbe_handle_t *lbh)
{
- return (strrchr(lbh->active, '/') + sizeof(char));
+ return (strrchr(lbh->rootfs, '/') + sizeof(char));
}
@@ -53,7 +53,7 @@ be_active_name(libbe_handle_t *lbh)
const char *
be_active_path(libbe_handle_t *lbh)
{
- return (lbh->active);
+ return (lbh->rootfs);
}