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)
Fri, Sep 18, 8:24 AM
Unknown Object (File)
Tue, Sep 8, 2:20 PM
Unknown Object (File)
Sat, Sep 5, 3:12 PM
Unknown Object (File)
Thu, Sep 3, 2:22 PM
Unknown Object (File)
Wed, Sep 2, 12:10 PM
Unknown Object (File)
Wed, Sep 2, 1:20 AM
Unknown Object (File)
Tue, Sep 1, 2:37 PM
Unknown Object (File)
Fri, Aug 28, 8:00 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