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
F150473562: D36188.id109282.diff
Wed, Apr 1, 12:51 PM
Unknown Object (File)
Sat, Mar 28, 9:34 AM
Unknown Object (File)
Mon, Mar 23, 9:36 PM
Unknown Object (File)
Fri, Mar 20, 1:21 PM
Unknown Object (File)
Thu, Mar 19, 8:18 PM
Unknown Object (File)
Mon, Mar 16, 5:49 AM
Unknown Object (File)
Feb 27 2026, 10:30 PM
Unknown Object (File)
Feb 27 2026, 6:09 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