MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nvpair_move_bool_array

Function nvpair_move_bool_array

freebsd/contrib/libnv/bsd_nvpair.c:1630–1649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1628}
1629
1630nvpair_t *
1631nvpair_move_bool_array(const char *name, bool *value, size_t nitems)
1632{
1633 nvpair_t *nvp;
1634
1635 if (value == NULL || nitems == 0) {
1636 ERRNO_SET(EINVAL);
1637 return (NULL);
1638 }
1639
1640 nvp = nvpair_allocv(name, NV_TYPE_BOOL_ARRAY,
1641 (uint64_t)(uintptr_t)value, sizeof(value[0]) * nitems, nitems);
1642 if (nvp == NULL) {
1643 ERRNO_SAVE();
1644 nv_free(value);
1645 ERRNO_RESTORE();
1646 }
1647
1648 return (nvp);
1649}
1650
1651nvpair_t *
1652nvpair_move_string_array(const char *name, char **value, size_t nitems)

Callers 1

nvlist_move_bool_arrayFunction · 0.85

Calls 1

nvpair_allocvFunction · 0.85

Tested by

no test coverage detected