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

Function zap_entry_read

freebsd/contrib/openzfs/module/zfs/zap_leaf.c:473–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473int
474zap_entry_read(const zap_entry_handle_t *zeh,
475 uint8_t integer_size, uint64_t num_integers, void *buf)
476{
477 struct zap_leaf_entry *le =
478 ZAP_LEAF_ENTRY(zeh->zeh_leaf, *zeh->zeh_chunkp);
479 ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY);
480
481 if (le->le_value_intlen > integer_size)
482 return (SET_ERROR(EINVAL));
483
484 zap_leaf_array_read(zeh->zeh_leaf, le->le_value_chunk,
485 le->le_value_intlen, le->le_value_numints,
486 integer_size, num_integers, buf);
487
488 if (zeh->zeh_num_integers > num_integers)
489 return (SET_ERROR(EOVERFLOW));
490 return (0);
491
492}
493
494int
495zap_entry_read_name(zap_t *zap, const zap_entry_handle_t *zeh, uint16_t buflen,

Callers 2

fzap_lookupFunction · 0.85
fzap_cursor_retrieveFunction · 0.85

Calls 1

zap_leaf_array_readFunction · 0.85

Tested by

no test coverage detected