dnvlist.c (282257) | dnvlist.c (285139) |
---|---|
1/*- 2 * Copyright (c) 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Pawel Jakub Dawidek under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Pawel Jakub Dawidek under sponsorship from 6 * the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/kern/subr_dnvlist.c 282257 2015-04-29 22:57:04Z oshogbo $"); | 31__FBSDID("$FreeBSD: head/sys/contrib/libnv/dnvlist.c 285139 2015-07-04 16:33:37Z oshogbo $"); |
32 33#ifdef _KERNEL 34 35#include <sys/types.h> 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/systm.h> 39#include <sys/malloc.h> 40 41#include <machine/stdarg.h> 42 43#else 44#include <stdarg.h> 45#include <stdbool.h> 46#include <stdint.h> 47#include <stdlib.h> 48#endif 49 | 32 33#ifdef _KERNEL 34 35#include <sys/types.h> 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/systm.h> 39#include <sys/malloc.h> 40 41#include <machine/stdarg.h> 42 43#else 44#include <stdarg.h> 45#include <stdbool.h> 46#include <stdint.h> 47#include <stdlib.h> 48#endif 49 |
50#include <sys/dnv.h> |
|
50#include <sys/nv.h> | 51#include <sys/nv.h> |
51#include <sys/nv_impl.h> | |
52 | 52 |
53#include <sys/dnv.h> | 53#include "nv_impl.h" |
54 55#define DNVLIST_GET(ftype, type) \ 56ftype \ 57dnvlist_get_##type(const nvlist_t *nvl, const char *name, ftype defval) \ 58{ \ 59 \ 60 if (nvlist_exists_##type(nvl, name)) \ 61 return (nvlist_get_##type(nvl, name)); \ --- 67 unchanged lines hidden --- | 54 55#define DNVLIST_GET(ftype, type) \ 56ftype \ 57dnvlist_get_##type(const nvlist_t *nvl, const char *name, ftype defval) \ 58{ \ 59 \ 60 if (nvlist_exists_##type(nvl, name)) \ 61 return (nvlist_get_##type(nvl, name)); \ --- 67 unchanged lines hidden --- |