Page MenuHomeFreeBSD

libbe: bail out early if the zfs kmod isn't loaded
ClosedPublic

Authored by kevans on Aug 13 2022, 12:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 12, 9:52 PM
Unknown Object (File)
Thu, Mar 6, 12:58 AM
Unknown Object (File)
Sun, Feb 23, 8:31 PM
Unknown Object (File)
Thu, Feb 20, 12:14 AM
Unknown Object (File)
Feb 16 2025, 3:51 PM
Unknown Object (File)
Feb 8 2025, 8:00 AM
Unknown Object (File)
Feb 4 2025, 8:50 PM
Unknown Object (File)
Jan 27 2025, 7:42 PM
Subscribers

Details

Summary

As noted in the comment, we already know the rest of libbe_init() will
fail because there's no pool imported. Avoid the side effect by
checking beforehand and bailing out early.

With this, freebsd-update(8) should no longer trigger a load of the zfs
kmod just because it runs bectl check.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable