]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libsa: Make the nvlist implementation more self-contained
authorMark Johnston <markj@FreeBSD.org>
Fri, 20 May 2022 14:17:35 +0000 (10:17 -0400)
committerMark Johnston <markj@FreeBSD.org>
Fri, 20 May 2022 14:35:19 +0000 (10:35 -0400)
commite097436cb2bc42e74d1dc2bf188c4491eeff3ec0
treeb0f348d9b0d6fbde1db92ebcb698353445a8317f
parentbcc3148c70c72cc409881e7a25e2bb053a39a0da
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
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35255
stand/libsa/zfs/libzfs.h
stand/libsa/zfs/nvlist.c
stand/libsa/zfs/nvlist.h [new file with mode: 0644]
sys/cddl/boot/zfs/zfsimpl.h