]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
stand: Separate base and cli parts of nvstore
authorWarner Losh <imp@FreeBSD.org>
Fri, 13 Jan 2023 21:19:30 +0000 (14:19 -0700)
committerWarner Losh <imp@FreeBSD.org>
Tue, 24 Jan 2023 21:49:46 +0000 (14:49 -0700)
commit10b9e348e4678a3849e2cd38c0e4aff722cc4926
treecabb8df13ae2d3d0a60ff4aaf28789c5d8fccea0
parent7956ceec924a4ef9a9f97c11efe89a959a5b23db
stand: Separate base and cli parts of nvstore

zfs lives in libsa. However, it depends on nvstore (and other things)
that are in common. Fix part of this layering violation by splitting
nvstore into a libsa piece (which is the base implementation) and
keeping a much smaller common piece (to implement the nvstore
command). This just leaves zfs' knowledge of device names that's
specific to common and its calling platform specific init code to
resolve. Add a nvstore.h file for these two parts to communicate private
things and move the public nvstore api from bootstrap.h to stand.h.

Sponsored by: Netflix
Reviewed by: tsoome, kevans
Differential Revision: https://reviews.freebsd.org/D38043

(cherry picked from commit d1ea5017141ffecdb7ce97a3d97b27a6aabf8c4a)
stand/common/bootstrap.h
stand/common/nvstore.c
stand/libsa/Makefile
stand/libsa/nvstore.c [new file with mode: 0644]
stand/libsa/nvstore.h [new file with mode: 0644]
stand/libsa/stand.h