3
0

bb_compat.c 1.3 KB

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