diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile index 61b158fe57c4..f7853b0d57a8 100644 --- a/lib/libnv/Makefile +++ b/lib/libnv/Makefile @@ -7,10 +7,13 @@ SHLIBDIR?= /lib LIB= nv SHLIB_MAJOR= 0 -SRCS= dnvlist.c +.PATH: ${.CURDIR}/../../sys/kern ${.CURDIR}/../../sys/sys +CFLAGS+=-I${.CURDIR}/../../sys -I${.CURDIR} + +SRCS= subr_dnvlist.c SRCS+= msgio.c -SRCS+= nvlist.c -SRCS+= nvpair.c +SRCS+= subr_nvlist.c +SRCS+= subr_nvpair.c INCS= dnv.h INCS+= nv.h diff --git a/sys/conf/files b/sys/conf/files index b4f6d73726d0..3e368ab0cd43 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3076,6 +3076,7 @@ kern/subr_clock.c standard kern/subr_counter.c standard kern/subr_devstat.c standard kern/subr_disk.c standard +kern/subr_dnvlist.c standard kern/subr_eventhandler.c standard kern/subr_fattime.c standard kern/subr_firmware.c optional firmware @@ -3089,6 +3090,8 @@ kern/subr_mbpool.c optional libmbpool kern/subr_mchain.c optional libmchain kern/subr_module.c standard kern/subr_msgbuf.c standard +kern/subr_nvlist.c standard +kern/subr_nvpair.c standard kern/subr_param.c standard kern/subr_pcpu.c standard kern/subr_pctrie.c standard diff --git a/lib/libnv/dnvlist.c b/sys/kern/subr_dnvlist.c similarity index 99% rename from lib/libnv/dnvlist.c rename to sys/kern/subr_dnvlist.c index 8dde6e084cf4..fe176845054e 100644 --- a/lib/libnv/dnvlist.c +++ b/sys/kern/subr_dnvlist.c @@ -47,10 +47,10 @@ __FBSDID("$FreeBSD$"); #include #endif -#include "nv.h" -#include "nv_impl.h" +#include +#include -#include "dnv.h" +#include #define DNVLIST_GET(ftype, type) \ ftype \ diff --git a/lib/libnv/nvlist.c b/sys/kern/subr_nvlist.c similarity index 99% rename from lib/libnv/nvlist.c rename to sys/kern/subr_nvlist.c index 95661b47bf3d..f352c6248305 100644 --- a/lib/libnv/nvlist.c +++ b/sys/kern/subr_nvlist.c @@ -56,17 +56,18 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include "msgio.h" #endif #ifdef HAVE_PJDLOG #include #endif -#include "msgio.h" -#include "nv.h" -#include "nv_impl.h" -#include "nvlist_impl.h" -#include "nvpair_impl.h" +#include +#include +#include +#include #ifndef HAVE_PJDLOG #ifdef _KERNEL diff --git a/lib/libnv/nvpair.c b/sys/kern/subr_nvpair.c similarity index 99% rename from lib/libnv/nvpair.c rename to sys/kern/subr_nvpair.c index ad6fb2716b50..7b88e424eae5 100644 --- a/lib/libnv/nvpair.c +++ b/sys/kern/subr_nvpair.c @@ -52,17 +52,18 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include "common_impl.h" #endif #ifdef HAVE_PJDLOG #include #endif -#include "common_impl.h" -#include "nv.h" -#include "nv_impl.h" -#include "nvlist_impl.h" -#include "nvpair_impl.h" +#include +#include +#include +#include #ifndef HAVE_PJDLOG #ifdef _KERNEL diff --git a/lib/libnv/dnv.h b/sys/sys/dnv.h similarity index 100% rename from lib/libnv/dnv.h rename to sys/sys/dnv.h diff --git a/lib/libnv/nv.h b/sys/sys/nv.h similarity index 100% rename from lib/libnv/nv.h rename to sys/sys/nv.h diff --git a/lib/libnv/nv_impl.h b/sys/sys/nv_impl.h similarity index 100% rename from lib/libnv/nv_impl.h rename to sys/sys/nv_impl.h diff --git a/lib/libnv/nvlist_impl.h b/sys/sys/nvlist_impl.h similarity index 100% rename from lib/libnv/nvlist_impl.h rename to sys/sys/nvlist_impl.h diff --git a/lib/libnv/nvpair_impl.h b/sys/sys/nvpair_impl.h similarity index 100% rename from lib/libnv/nvpair_impl.h rename to sys/sys/nvpair_impl.h