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

Function zdb_parse_block_sizes

freebsd/contrib/openzfs/cmd/zdb/zdb.c:7715–7730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7713}
7714
7715static boolean_t
7716zdb_parse_block_sizes(char *sizes, uint64_t *lsize, uint64_t *psize)
7717{
7718 char *s0, *s1;
7719
7720 if (sizes == NULL)
7721 return (B_FALSE);
7722
7723 s0 = strtok(sizes, "/");
7724 if (s0 == NULL)
7725 return (B_FALSE);
7726 s1 = strtok(NULL, "/");
7727 *lsize = strtoull(s0, NULL, 16);
7728 *psize = s1 ? strtoull(s1, NULL, 16) : *lsize;
7729 return (*lsize >= *psize && *psize > 0);
7730}
7731
7732#define ZIO_COMPRESS_MASK(alg) (1ULL << (ZIO_COMPRESS_##alg))
7733

Callers 1

zdb_read_blockFunction · 0.85

Calls 1

strtokFunction · 0.85

Tested by

no test coverage detected