2 * write_bb_file.c --- write a list of bad blocks to a FILE *
4 * Copyright (C) 1994, 1995 Theodore Ts'o.
7 * This file may be redistributed under the terms of the GNU Public
14 #if EXT2_FLAT_INCLUDES
17 #include <linux/ext2_fs.h>
22 errcode_t ext2fs_write_bb_FILE(ext2_badblocks_list bb_list,
26 badblocks_iterate bb_iter;
30 retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
34 while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) {
35 fprintf(f, "%d\n", blk);
37 ext2fs_badblocks_list_iterate_end(bb_iter);