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)
Sat, Oct 11, 4:50 AM
Unknown Object (File)
Sat, Oct 11, 4:50 AM
Unknown Object (File)
Sat, Oct 11, 4:50 AM
Unknown Object (File)
Fri, Oct 10, 9:41 PM
Unknown Object (File)
Wed, Oct 8, 2:19 AM
Unknown Object (File)
Mon, Oct 6, 1:58 PM
Unknown Object (File)
Tue, Sep 30, 2:12 AM
Unknown Object (File)
Sun, Sep 28, 5:45 AM
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