Deleted Added
full compact
fnvpair.c (240415) fnvpair.c (248571)
1
2/*
3 * CDDL HEADER START
4 *
5 * The contents of this file are subject to the terms of the
6 * Common Development and Distribution License (the "License").
7 * You may not use this file except in compliance with the License.
8 *

--- 16 unchanged lines hidden (view full) ---

25 */
26
27#include <sys/nvpair.h>
28#ifndef _KERNEL
29#include <sys/zfs_context.h>
30#else
31#include <sys/debug.h>
32#include <sys/kmem.h>
1
2/*
3 * CDDL HEADER START
4 *
5 * The contents of this file are subject to the terms of the
6 * Common Development and Distribution License (the "License").
7 * You may not use this file except in compliance with the License.
8 *

--- 16 unchanged lines hidden (view full) ---

25 */
26
27#include <sys/nvpair.h>
28#ifndef _KERNEL
29#include <sys/zfs_context.h>
30#else
31#include <sys/debug.h>
32#include <sys/kmem.h>
33#include <sys/param.h>
34#include <sys/debug.h>
33#endif
34
35/*
36 * "Force" nvlist wrapper.
37 *
38 * These functions wrap the nvlist_* functions with assertions that assume
39 * the operation is successful. This allows the caller's code to be much
40 * more readable, especially for the fnvlist_lookup_* and fnvpair_value_*

--- 70 unchanged lines hidden (view full) ---

111}
112
113void
114fnvlist_merge(nvlist_t *dst, nvlist_t *src)
115{
116 VERIFY0(nvlist_merge(dst, src, KM_SLEEP));
117}
118
35#endif
36
37/*
38 * "Force" nvlist wrapper.
39 *
40 * These functions wrap the nvlist_* functions with assertions that assume
41 * the operation is successful. This allows the caller's code to be much
42 * more readable, especially for the fnvlist_lookup_* and fnvpair_value_*

--- 70 unchanged lines hidden (view full) ---

113}
114
115void
116fnvlist_merge(nvlist_t *dst, nvlist_t *src)
117{
118 VERIFY0(nvlist_merge(dst, src, KM_SLEEP));
119}
120
121size_t
122fnvlist_num_pairs(nvlist_t *nvl)
123{
124 size_t count = 0;
125 nvpair_t *pair;
126
127 for (pair = nvlist_next_nvpair(nvl, 0); pair != NULL;
128 pair = nvlist_next_nvpair(nvl, pair))
129 count++;
130 return (count);
131}
132
119void
120fnvlist_add_boolean(nvlist_t *nvl, const char *name)
121{
122 VERIFY0(nvlist_add_boolean(nvl, name));
123}
124
125void
126fnvlist_add_boolean_value(nvlist_t *nvl, const char *name, boolean_t val)

--- 372 unchanged lines hidden ---
133void
134fnvlist_add_boolean(nvlist_t *nvl, const char *name)
135{
136 VERIFY0(nvlist_add_boolean(nvl, name));
137}
138
139void
140fnvlist_add_boolean_value(nvlist_t *nvl, const char *name, boolean_t val)

--- 372 unchanged lines hidden ---