HomeFreeBSD

libsa: Make the nvlist implementation more self-contained

Description

libsa: Make the nvlist implementation more self-contained

Move declarations into a new nvlist.h rather than putting everything in
libzfs.h. This makes this nvlist code easier to reuse elsewhere. In
particular, the nvlist implementation in sys/contrib/libnv does not
provide XDR encoding, but this is needed when reading from or writing to
ZFS pools.

Also:

  • Remove references to boolean_t. It has to be a 32-bit int here, so just reference the underlying type.
  • Add includes needed when compiling the nvlist code outside of stand/.

No functional change intended.

Reviewed by: tsoome
Sponsored by: The FreeBSD Foundation

(cherry picked from commit e097436cb2bc42e74d1dc2bf188c4491eeff3ec0)

Details

Provenance
markjAuthored on May 20 2022, 2:17 PM
Parents
rGf2206d2f94a4: libsa: Fix a bug in nvlist creation
Branches
Unknown
Tags
Unknown