1 /* vi: set sw=4 ts=4: */
3 * write_bb_file.c --- write a list of bad blocks to a FILE *
5 * Copyright (C) 1994, 1995 Theodore Ts'o.
8 * This file may be redistributed under the terms of the GNU Public
18 errcode_t ext2fs_write_bb_FILE(ext2_badblocks_list bb_list,
19 unsigned int flags EXT2FS_ATTR((unused)),
22 badblocks_iterate bb_iter;
26 retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
30 while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) {
31 fprintf(f, "%d\n", blk);
33 ext2fs_badblocks_list_iterate_end(bb_iter);