blob: 2a2c1ecf6d53160244f258fb8aaf06e8b0e15c82 [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>
20#include <sys/stat.h>
21#include <sys/types.h>
22#if HAVE_ERRNO_H
23#include <errno.h>
24#endif
25
26#include <linux/ext2_fs.h>
27
28#include "ext2fsP.h"
29
30errcode_t badblocks_list_create(badblocks_list *ret, int size)
31{
32 return ext2fs_badblocks_list_create(ret, size);
33}
34
35void badblocks_list_free(badblocks_list bb)
36{
37 ext2fs_badblocks_list_free(bb);
38}
39
40errcode_t badblocks_list_add(badblocks_list bb, blk_t blk)
41{
42 return ext2fs_badblocks_list_add(bb, blk);
43}
44
45int badblocks_list_test(badblocks_list bb, blk_t blk)
46{
47 return ext2fs_badblocks_list_test(bb, blk);
48}
49
50errcode_t badblocks_list_iterate_begin(badblocks_list bb,
51 badblocks_iterate *ret)
52{
53 return ext2fs_badblocks_list_iterate_begin(bb, ret);
54}
55
56int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk)
57{
58 return ext2fs_badblocks_list_iterate(iter, blk);
59}
60
61void badblocks_list_iterate_end(badblocks_iterate iter)
62{
63 ext2fs_badblocks_list_iterate_end(iter);
64}