summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshogbo <oshogbo@FreeBSD.org>2015-07-04 16:33:37 +0000
committeroshogbo <oshogbo@FreeBSD.org>2015-07-04 16:33:37 +0000
commit852c8fe5892ac15db686e35cc70e512fd442325a (patch)
treef63c85b8d1ce38d4ce3462fedd0442350e88453f
parent84067f697fba64e6bebc74d31f9f782ab586e540 (diff)
downloadFreeBSD-src-852c8fe5892ac15db686e35cc70e512fd442325a.zip
FreeBSD-src-852c8fe5892ac15db686e35cc70e512fd442325a.tar.gz
Move the nvlist source and private includes from sys/kern to seperate
directory sys/contrib/libnv. The goal of this operation is to NOT install header files which shouldn't be used outside the nvlist library. Approved by: pjd (mentor)
-rw-r--r--lib/libnv/Makefile8
-rw-r--r--sys/conf/files6
-rw-r--r--sys/contrib/libnv/dnvlist.c (renamed from sys/kern/subr_dnvlist.c)4
-rw-r--r--sys/contrib/libnv/nv_impl.h (renamed from sys/sys/nv_impl.h)0
-rw-r--r--sys/contrib/libnv/nvlist.c (renamed from sys/kern/subr_nvlist.c)7
-rw-r--r--sys/contrib/libnv/nvlist_impl.h (renamed from sys/sys/nvlist_impl.h)4
-rw-r--r--sys/contrib/libnv/nvpair.c (renamed from sys/kern/subr_nvpair.c)7
-rw-r--r--sys/contrib/libnv/nvpair_impl.h (renamed from sys/sys/nvpair_impl.h)3
8 files changed, 20 insertions, 19 deletions
diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile
index 1aef64e..38ec009 100644
--- a/lib/libnv/Makefile
+++ b/lib/libnv/Makefile
@@ -7,13 +7,13 @@ SHLIBDIR?= /lib
LIB= nv
SHLIB_MAJOR= 0
-.PATH: ${.CURDIR}/../../sys/kern ${.CURDIR}/../../sys/sys
+.PATH: ${.CURDIR}/../../sys/contrib/libnv ${.CURDIR}/../../sys/sys
CFLAGS+=-I${.CURDIR}/../../sys -I${.CURDIR}
-SRCS= subr_dnvlist.c
+SRCS= dnvlist.c
SRCS+= msgio.c
-SRCS+= subr_nvlist.c
-SRCS+= subr_nvpair.c
+SRCS+= nvlist.c
+SRCS+= nvpair.c
WARNS?= 6
diff --git a/sys/conf/files b/sys/conf/files
index a87ca29..65ad102 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -476,6 +476,9 @@ contrib/libfdt/fdt_rw.c optional fdt
contrib/libfdt/fdt_strerror.c optional fdt
contrib/libfdt/fdt_sw.c optional fdt
contrib/libfdt/fdt_wip.c optional fdt
+contrib/libnv/dnvlist.c standard
+contrib/libnv/nvlist.c standard
+contrib/libnv/nvpair.c standard
contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \
compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm"
contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \
@@ -3054,7 +3057,6 @@ 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
@@ -3068,8 +3070,6 @@ 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/sys/kern/subr_dnvlist.c b/sys/contrib/libnv/dnvlist.c
index 9058520..c2106c5 100644
--- a/sys/kern/subr_dnvlist.c
+++ b/sys/contrib/libnv/dnvlist.c
@@ -47,10 +47,10 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#endif
+#include <sys/dnv.h>
#include <sys/nv.h>
-#include <sys/nv_impl.h>
-#include <sys/dnv.h>
+#include "nv_impl.h"
#define DNVLIST_GET(ftype, type) \
ftype \
diff --git a/sys/sys/nv_impl.h b/sys/contrib/libnv/nv_impl.h
index c088c3d..c088c3d 100644
--- a/sys/sys/nv_impl.h
+++ b/sys/contrib/libnv/nv_impl.h
diff --git a/sys/kern/subr_nvlist.c b/sys/contrib/libnv/nvlist.c
index de1972e..3138001 100644
--- a/sys/kern/subr_nvlist.c
+++ b/sys/contrib/libnv/nvlist.c
@@ -65,9 +65,10 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/nv.h>
-#include <sys/nv_impl.h>
-#include <sys/nvlist_impl.h>
-#include <sys/nvpair_impl.h>
+
+#include "nv_impl.h"
+#include "nvlist_impl.h"
+#include "nvpair_impl.h"
#ifndef HAVE_PJDLOG
#ifdef _KERNEL
diff --git a/sys/sys/nvlist_impl.h b/sys/contrib/libnv/nvlist_impl.h
index 8aeac67..18ccebf 100644
--- a/sys/sys/nvlist_impl.h
+++ b/sys/contrib/libnv/nvlist_impl.h
@@ -32,12 +32,12 @@
#ifndef _NVLIST_IMPL_H_
#define _NVLIST_IMPL_H_
+#include <sys/nv.h>
+
#ifndef _KERNEL
#include <stdint.h>
#endif
-#include "nv.h"
-
nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl);
const unsigned char *nvlist_unpack_header(nvlist_t *nvl,
const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp);
diff --git a/sys/kern/subr_nvpair.c b/sys/contrib/libnv/nvpair.c
index 44b0ab8..7146767 100644
--- a/sys/kern/subr_nvpair.c
+++ b/sys/contrib/libnv/nvpair.c
@@ -61,9 +61,10 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/nv.h>
-#include <sys/nv_impl.h>
-#include <sys/nvlist_impl.h>
-#include <sys/nvpair_impl.h>
+
+#include "nv_impl.h"
+#include "nvlist_impl.h"
+#include "nvpair_impl.h"
#ifndef HAVE_PJDLOG
#ifdef _KERNEL
diff --git a/sys/sys/nvpair_impl.h b/sys/contrib/libnv/nvpair_impl.h
index 61885e6..fed7725 100644
--- a/sys/sys/nvpair_impl.h
+++ b/sys/contrib/libnv/nvpair_impl.h
@@ -32,14 +32,13 @@
#ifndef _NVPAIR_IMPL_H_
#define _NVPAIR_IMPL_H_
+#include <sys/nv.h>
#include <sys/queue.h>
#ifndef _KERNEL
#include <stdint.h>
#endif
-#include "nv.h"
-
TAILQ_HEAD(nvl_head, nvpair);
void nvpair_assert(const nvpair_t *nvp);
OpenPOWER on IntegriCloud