blob: d47a91612ae3ca1a982f2fc4396b6e98572bb79a [file] [log] [blame]
Theodore Ts'o21c84b71997-04-29 16:15:03 +00001/*
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 Public
8 * License.
9 * %End-Header%
10 */
11
12#include <stdio.h>
13#include <string.h>
Theodore Ts'o4cbe8af1997-08-10 23:07:40 +000014#if HAVE_UNISTD_H
Theodore Ts'o21c84b71997-04-29 16:15:03 +000015#include <unistd.h>
Theodore Ts'o4cbe8af1997-08-10 23:07:40 +000016#endif
Theodore Ts'o21c84b71997-04-29 16:15:03 +000017#include <stdlib.h>
18#include <fcntl.h>
19#include <time.h>
Theodore Ts'o1d2ff461997-10-19 23:00:21 +000020#if HAVE_SYS_STAT_H
Theodore Ts'o21c84b71997-04-29 16:15:03 +000021#include <sys/stat.h>
Theodore Ts'o1d2ff461997-10-19 23:00:21 +000022#endif
23#if HAVE_SYS_TYPES_H
Theodore Ts'o21c84b71997-04-29 16:15:03 +000024#include <sys/types.h>
Theodore Ts'o1d2ff461997-10-19 23:00:21 +000025#endif
Theodore Ts'o21c84b71997-04-29 16:15:03 +000026#if HAVE_ERRNO_H
27#include <errno.h>
28#endif
29
30#include <linux/ext2_fs.h>
31
32#include "ext2fsP.h"
33
34errcode_t badblocks_list_create(badblocks_list *ret, int size)
35{
36 return ext2fs_badblocks_list_create(ret, size);
37}
38
39void badblocks_list_free(badblocks_list bb)
40{
41 ext2fs_badblocks_list_free(bb);
42}
43
44errcode_t badblocks_list_add(badblocks_list bb, blk_t blk)
45{
46 return ext2fs_badblocks_list_add(bb, blk);
47}
48
49int badblocks_list_test(badblocks_list bb, blk_t blk)
50{
51 return ext2fs_badblocks_list_test(bb, blk);
52}
53
54errcode_t badblocks_list_iterate_begin(badblocks_list bb,
55 badblocks_iterate *ret)
56{
57 return ext2fs_badblocks_list_iterate_begin(bb, ret);
58}
59
60int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk)
61{
62 return ext2fs_badblocks_list_iterate(iter, blk);
63}
64
65void badblocks_list_iterate_end(badblocks_iterate iter)
66{
67 ext2fs_badblocks_list_iterate_end(iter);
68}