1 /*
2  * bb_compat.c --- compatibility badblocks routines
3  *
4  * Copyright (C) 1997 Theodore Ts'o.
5  *
6  * %Begin-Header%
7  * This file may be redistributed under the terms of the GNU Library
8  * General Public License, version 2.
9  * %End-Header%
10  */
11 
12 #include "config.h"
13 #include <stdio.h>
14 #include <string.h>
15 #if HAVE_UNISTD_H
16 #include <unistd.h>
17 #endif
18 #include <fcntl.h>
19 #include <time.h>
20 #if HAVE_SYS_STAT_H
21 #include <sys/stat.h>
22 #endif
23 #if HAVE_SYS_TYPES_H
24 #include <sys/types.h>
25 #endif
26 
27 #include "ext2_fs.h"
28 #include "ext2fsP.h"
29 
badblocks_list_create(badblocks_list * ret,int size)30 errcode_t badblocks_list_create(badblocks_list *ret, int size)
31 {
32 	return ext2fs_badblocks_list_create(ret, size);
33 }
34 
badblocks_list_free(badblocks_list bb)35 void badblocks_list_free(badblocks_list bb)
36 {
37 	ext2fs_badblocks_list_free(bb);
38 }
39 
badblocks_list_add(badblocks_list bb,blk_t blk)40 errcode_t badblocks_list_add(badblocks_list bb, blk_t blk)
41 {
42 	return ext2fs_badblocks_list_add(bb, blk);
43 }
44 
badblocks_list_test(badblocks_list bb,blk_t blk)45 int badblocks_list_test(badblocks_list bb, blk_t blk)
46 {
47 	return ext2fs_badblocks_list_test(bb, blk);
48 }
49 
badblocks_list_iterate_begin(badblocks_list bb,badblocks_iterate * ret)50 errcode_t badblocks_list_iterate_begin(badblocks_list bb,
51 				       badblocks_iterate *ret)
52 {
53 	return ext2fs_badblocks_list_iterate_begin(bb, ret);
54 }
55 
badblocks_list_iterate(badblocks_iterate iter,blk_t * blk)56 int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk)
57 {
58 	return ext2fs_badblocks_list_iterate(iter, blk);
59 }
60 
badblocks_list_iterate_end(badblocks_iterate iter)61 void badblocks_list_iterate_end(badblocks_iterate iter)
62 {
63 	ext2fs_badblocks_list_iterate_end(iter);
64 }
65