| Theodore Ts'o | 21c84b7 | 1997-04-29 16:15:03 +0000 | [diff] [blame^] | 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 Public |
| 8 | * License. |
| 9 | * %End-Header% |
| 10 | */ |
| 11 | |
| 12 | #include <stdio.h> |
| 13 | #include <string.h> |
| 14 | #include <unistd.h> |
| 15 | #include <stdlib.h> |
| 16 | #include <fcntl.h> |
| 17 | #include <time.h> |
| 18 | #include <sys/stat.h> |
| 19 | #include <sys/types.h> |
| 20 | #if HAVE_ERRNO_H |
| 21 | #include <errno.h> |
| 22 | #endif |
| 23 | |
| 24 | #include <linux/ext2_fs.h> |
| 25 | |
| 26 | #include "ext2fsP.h" |
| 27 | |
| 28 | errcode_t badblocks_list_create(badblocks_list *ret, int size) |
| 29 | { |
| 30 | return ext2fs_badblocks_list_create(ret, size); |
| 31 | } |
| 32 | |
| 33 | void badblocks_list_free(badblocks_list bb) |
| 34 | { |
| 35 | ext2fs_badblocks_list_free(bb); |
| 36 | } |
| 37 | |
| 38 | errcode_t badblocks_list_add(badblocks_list bb, blk_t blk) |
| 39 | { |
| 40 | return ext2fs_badblocks_list_add(bb, blk); |
| 41 | } |
| 42 | |
| 43 | int badblocks_list_test(badblocks_list bb, blk_t blk) |
| 44 | { |
| 45 | return ext2fs_badblocks_list_test(bb, blk); |
| 46 | } |
| 47 | |
| 48 | errcode_t badblocks_list_iterate_begin(badblocks_list bb, |
| 49 | badblocks_iterate *ret) |
| 50 | { |
| 51 | return ext2fs_badblocks_list_iterate_begin(bb, ret); |
| 52 | } |
| 53 | |
| 54 | int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk) |
| 55 | { |
| 56 | return ext2fs_badblocks_list_iterate(iter, blk); |
| 57 | } |
| 58 | |
| 59 | void badblocks_list_iterate_end(badblocks_iterate iter) |
| 60 | { |
| 61 | ext2fs_badblocks_list_iterate_end(iter); |
| 62 | } |