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

Function nvlist_add_binary

freebsd/contrib/libnv/nvlist.c:1537–1555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1535}
1536
1537void
1538nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value,
1539 size_t size)
1540{
1541 nvpair_t *nvp;
1542
1543 if (nvlist_error(nvl) != 0) {
1544 ERRNO_SET(nvlist_error(nvl));
1545 return;
1546 }
1547
1548 nvp = nvpair_create_binary(name, value, size);
1549 if (nvp == NULL) {
1550 nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM);
1551 ERRNO_SET(nvl->nvl_error);
1552 } else {
1553 (void)nvlist_move_nvpair(nvl, nvp);
1554 }
1555}
1556
1557
1558#define NVLIST_ADD(vtype, type) \

Callers

nothing calls this directly

Calls 2

nvlist_errorFunction · 0.85
nvpair_create_binaryFunction · 0.85

Tested by

no test coverage detected