exfat_part.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_PART_H
  19. #define _EXFAT_PART_H
  20. #include "exfat_config.h"
  21. #include "exfat_global.h"
  22. #include "exfat_api.h"
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. #define MBR_SIGNATURE 0xAA55
  27. typedef struct {
  28. UINT8 boot_code[446];
  29. UINT8 partition[64];
  30. UINT8 signature[2];
  31. } MBR_SECTOR_T;
  32. typedef struct {
  33. UINT8 def_boot;
  34. UINT8 bgn_chs[3];
  35. UINT8 sys_type;
  36. UINT8 end_chs[3];
  37. UINT8 start_sector[4];
  38. UINT8 num_sectors[4];
  39. } PART_ENTRY_T;
  40. INT32 ffsSetPartition(INT32 dev, INT32 num_vol, PART_INFO_T *vol_spec);
  41. INT32 ffsGetPartition(INT32 dev, INT32 *num_vol, PART_INFO_T *vol_spec);
  42. INT32 ffsGetDevInfo(INT32 dev, DEV_INFO_T *info);
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif