logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pmem2_badblock_next() - read the next bad block for the given bad block context *bbctx.

Description

The pmem2_badblock_next() function reads the next bad block for the given bad block context *bbctx. It is not supported on Windows.

Errors

pmem2_badblock_next() can fail with the following error: • PMEM2_E_NO_BAD_BLOCK_FOUND - there are no more bad blocks for the given bad block context *bbctx, *bb is undefined in this case. • PMEM2_E_NOSUPP - on Windows or when the OS does not support this functionality

Name

pmem2_badblock_next() - read the next bad block for the given bad block context *bbctx.

Return Value

The pmem2_badblock_next() function returns 0 and stores the next bad block in *bb on success or it re‐ turns a negative error code when there are no more bad blocks for the given bad block context *bbctx.

See Also

pmem2_badblock_context_new(3), pmem2_badblock_clear(3), libpmem2(7) and <https://pmem.io>

Synopsis

#include <libpmem2.h> struct pmem2_badblock; struct pmem2_badblock_context; int pmem2_badblock_next( struct pmem2_badblock_context *bbctx, struct pmem2_badblock *bb);

See Also