| 126 | } __packed; |
| 127 | |
| 128 | nvlist_t * |
| 129 | nvlist_create(int flags) |
| 130 | { |
| 131 | nvlist_t *nvl; |
| 132 | |
| 133 | PJDLOG_ASSERT((flags & ~(NV_FLAG_PUBLIC_MASK)) == 0); |
| 134 | |
| 135 | nvl = nv_malloc(sizeof(*nvl)); |
| 136 | if (nvl == NULL) |
| 137 | return (NULL); |
| 138 | nvl->nvl_error = 0; |
| 139 | nvl->nvl_flags = flags; |
| 140 | nvl->nvl_parent = NULL; |
| 141 | nvl->nvl_array_next = NULL; |
| 142 | TAILQ_INIT(&nvl->nvl_head); |
| 143 | nvl->nvl_magic = NVLIST_MAGIC; |
| 144 | |
| 145 | return (nvl); |
| 146 | } |
| 147 | |
| 148 | void |
| 149 | nvlist_destroy(nvlist_t *nvl) |
no outgoing calls
no test coverage detected