exfat_blkdev.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version 2
  7. * of the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef _EXFAT_BLKDEV_H
  19. #define _EXFAT_BLKDEV_H
  20. #include "exfat_config.h"
  21. #include "exfat_global.h"
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. typedef struct __BD_INFO_T {
  26. INT32 sector_size;
  27. INT32 sector_size_bits;
  28. INT32 sector_size_mask;
  29. INT32 num_sectors;
  30. BOOL opened;
  31. } BD_INFO_T;
  32. INT32 bdev_init(void);
  33. INT32 bdev_shutdown(void);
  34. INT32 bdev_open(struct super_block *sb);
  35. INT32 bdev_close(struct super_block *sb);
  36. INT32 bdev_read(struct super_block *sb, UINT32 secno, struct buffer_head **bh, UINT32 num_secs, INT32 read);
  37. INT32 bdev_write(struct super_block *sb, UINT32 secno, struct buffer_head *bh, UINT32 num_secs, INT32 sync);
  38. INT32 bdev_sync(struct super_block *sb);
  39. INT32 bdev_reada(struct super_block *sb, UINT32 secno, UINT32 num_secs);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif