Changeset 6d57e1c in mainline for uspace/srv/fs/exfat/exfat.h
- Timestamp:
- 2011-06-27T19:39:06Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 620a367
- Parents:
- efa8ed93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat.h
refa8ed93 r6d57e1c 49 49 #define BS_SIZE 512 50 50 51 #define BPS(bs) (1 << (bs->bytes_per_sector)) 52 #define SPC(bs) (1 << (bs->sec_per_cluster)) 53 #define VOL_ST(bs) uint64_t_le2host(bs->volume_start) 54 #define VOL_CNT(bs) uint64_t_le2host(bs->volume_count) 55 #define FAT_ST(bs) uint32_t_le2host(bs->fat_sector_start) 56 #define FAT_CNT(bs) uint32_t_le2host(bs->fat_sector_count) 57 #define DATA_ST(bs) uint32_t_le2host(bs->data_start_sector) 58 #define DATA_CNT(bs) uint32_t_le2host(bs->data_clusters) 59 #define ROOT_ST(bs) uint32_t_le2host(bs->rootdir_cluster) 60 #define VOL_FLAGS uint16_t_le2host(bs->volume_flags) 51 61 52 62 63 typedef struct exfat_bs { 64 uint8_t jump[3]; /* 0x00 jmp and nop instructions */ 65 uint8_t oem_name[8]; /* 0x03 "EXFAT " */ 66 uint8_t __reserved[53]; /* 0x0B always 0 */ 67 uint64_t volume_start; /* 0x40 partition first sector */ 68 uint64_t volume_count; /* 0x48 partition sectors count */ 69 uint32_t fat_sector_start; /* 0x50 FAT first sector */ 70 uint32_t fat_sector_count; /* 0x54 FAT sectors count */ 71 uint32_t data_start_sector; /* 0x58 Data region first cluster sector */ 72 uint32_t data_clusters; /* 0x5C total clusters count */ 73 uint32_t rootdir_cluster; /* 0x60 first cluster of the root dir */ 74 uint32_t volume_serial; /* 0x64 volume serial number */ 75 struct { /* 0x68 FS version */ 76 uint8_t minor; 77 uint8_t major; 78 } __attribute__ ((packed)) version; 79 uint16_t volume_flags; /* 0x6A volume state flags */ 80 uint8_t bytes_per_sector; /* 0x6C sector size as (1 << n) */ 81 uint8_t sec_per_cluster; /* 0x6D sectors per cluster as (1 << n) */ 82 uint8_t fat_count; /* 0x6E always 1 */ 83 uint8_t drive_no; /* 0x6F always 0x80 */ 84 uint8_t allocated_percent; /* 0x70 percentage of allocated space */ 85 uint8_t _reserved2[7]; /* 0x71 reserved */ 86 uint8_t bootcode[390]; /* Boot code */ 87 uint16_t signature; /* the value of 0xAA55 */ 88 } __attribute__((__packed__)) exfat_bs_t; 89 90 91 extern fs_reg_t exfat_reg; 92 93 extern void exfat_mounted(ipc_callid_t, ipc_call_t *); 94 extern void exfat_mount(ipc_callid_t, ipc_call_t *); 95 extern void exfat_unmounted(ipc_callid_t, ipc_call_t *); 96 extern void exfat_unmount(ipc_callid_t, ipc_call_t *); 53 97 54 98 #endif
Note:
See TracChangeset
for help on using the changeset viewer.