bb_compat.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #include <stdio.h>
  12. #include <string.h>
  13. #if HAVE_UNISTD_H
  14. #include <unistd.h>
  15. #endif
  16. #include <fcntl.h>
  17. #include <time.h>
  18. #if HAVE_SYS_STAT_H
  19. #include <sys/stat.h>
  20. #endif
  21. #if HAVE_SYS_TYPES_H
  22. #include <sys/types.h>
  23. #endif
  24. #include "ext2_fs.h"
  25. #include "ext2fsP.h"
  26. errcode_t badblocks_list_create(badblocks_list *ret, int size)
  27. {
  28. return ext2fs_badblocks_list_create(ret, size);
  29. }
  30. void badblocks_list_free(badblocks_list bb)
  31. {
  32. ext2fs_badblocks_list_free(bb);
  33. }
  34. errcode_t badblocks_list_add(badblocks_list bb, blk_t blk)
  35. {
  36. return ext2fs_badblocks_list_add(bb, blk);
  37. }
  38. int badblocks_list_test(badblocks_list bb, blk_t blk)
  39. {
  40. return ext2fs_badblocks_list_test(bb, blk);
  41. }
  42. errcode_t badblocks_list_iterate_begin(badblocks_list bb,
  43. badblocks_iterate *ret)
  44. {
  45. return ext2fs_badblocks_list_iterate_begin(bb, ret);
  46. }
  47. int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk)
  48. {
  49. return ext2fs_badblocks_list_iterate(iter, blk);
  50. }
  51. void badblocks_list_iterate_end(badblocks_iterate iter)
  52. {
  53. ext2fs_badblocks_list_iterate_end(iter);
  54. }