1()                         PMDK Programmer's Manual                         ()
2
3
4

NAME

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

SYNOPSIS

10              #include <libpmem2.h>
11
12              struct pmem2_badblock;
13              struct pmem2_badblock_context;
14
15              int pmem2_badblock_next(
16                      struct pmem2_badblock_context *bbctx,
17                      struct pmem2_badblock *bb);
18

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

SEE ALSO

40       pmem2_badblock_context_new(3), pmem2_badblock_clear(3), libpmem2(7) and
41       <https://pmem.io>
42
43
44
45PMDK -                            2023-06-05                                ()
Impressum