Commit Graph

55 Commits

Author SHA1 Message Date
Kyle Evans
ff8676cc4e libbe(3): Add nextboot flag to returned BE information 2018-07-25 14:45:00 +00:00
Kyle Evans
bfe0869c7f libbe(3): make style consistent with what I'll use going forward 2018-07-25 03:50:01 +00:00
Kyle Evans
ee16b7c946 libbe(3): Find rootfs instead by enumerating child datasets of BE root
This makes us more resilient to a rename of the bootfs, but still wouldn't
withstand pool renames or guid renames. More importantly, this allows `bectl
create <foo>` work out of the box to create a boot environment based on the
currently booted one.
2018-07-25 03:30:01 +00:00
Kyle Evans
c3a34c08e0 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.
2018-07-25 03:08:11 +00:00
Kyle Evans
28f16a0f19 Import libbe(3)/be(1) from socsvn/soc2017/kneitinger/libbe-head 2018-07-24 13:17:40 +00:00