mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-30 23:24:18 +01:00
30bc03c9fa
-updated libext2fs to e2fsprogs 1.42 -updated libfat to R4883 Thanks to USB Loader GX for the new libs
36 lines
779 B
C
36 lines
779 B
C
/*
|
|
* write_bb_file.c --- write a list of bad blocks to a FILE *
|
|
*
|
|
* Copyright (C) 1994, 1995 Theodore Ts'o.
|
|
*
|
|
* %Begin-Header%
|
|
* This file may be redistributed under the terms of the GNU Library
|
|
* General Public License, version 2.
|
|
* %End-Header%
|
|
*/
|
|
|
|
#include "config.h"
|
|
#include <stdio.h>
|
|
|
|
#include "ext2_fs.h"
|
|
#include "ext2fs.h"
|
|
|
|
errcode_t ext2fs_write_bb_FILE(ext2_badblocks_list bb_list,
|
|
unsigned int flags EXT2FS_ATTR((unused)),
|
|
FILE *f)
|
|
{
|
|
badblocks_iterate bb_iter;
|
|
blk_t blk;
|
|
errcode_t retval;
|
|
|
|
retval = ext2fs_badblocks_list_iterate_begin(bb_list, &bb_iter);
|
|
if (retval)
|
|
return retval;
|
|
|
|
while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) {
|
|
fprintf(f, "%u\n", blk);
|
|
}
|
|
ext2fs_badblocks_list_iterate_end(bb_iter);
|
|
return 0;
|
|
}
|