X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Fexfatprogs.git;a=blobdiff_plain;f=include%2Fexfat_ondisk.h;h=b3fc1fe4d13a3c1bbc2fea65154d16baf6a25ab7;hp=163bef01c2c4c3eefc2a0f09859341438a9619f0;hb=HEAD;hpb=ca9b0f7353eba0cfbee98236d3487bbb6a8ec26f diff --git a/include/exfat_ondisk.h b/include/exfat_ondisk.h index 163bef0..42cdadf 100644 --- a/include/exfat_ondisk.h +++ b/include/exfat_ondisk.h @@ -39,6 +39,8 @@ #define DENTRY_SIZE_BITS 5 /* exFAT allows 8388608(256MB) directory entries */ #define MAX_EXFAT_DENTRIES 8388608 +#define MIN_FILE_DENTRIES 3 +#define MAX_NAME_DENTRIES 17 /* dentry types */ #define MSDOS_DELETED 0xE5 /* deleted mark */ @@ -93,7 +95,7 @@ #define EXFAT_BAD_CLUSTER (0xFFFFFFF7U) #define EXFAT_FREE_CLUSTER (0) #define EXFAT_FIRST_CLUSTER (2) -#define EXFAT_REVERVED_CLUSTERS (2) +#define EXFAT_RESERVED_CLUSTERS (2) /* EXFAT BIOS parameter block (64 bytes) */ @@ -131,18 +133,8 @@ struct pbr { __le16 signature; }; -/* Extended Boot Sector */ -struct exbs { - __u8 zero[510]; - __le16 signature; -}; - -/* Extended Boot Record (8 sectors) */ -struct expbr { - struct exbs eb[8]; -}; - #define VOLUME_LABEL_MAX_LEN 11 +#define VOLUME_GUID_LEN 16 #define ENTRY_NAME_MAX 15 struct exfat_dentry { @@ -167,8 +159,10 @@ struct exfat_dentry { __le16 access_date; __u8 create_time_ms; __u8 modify_time_ms; - __u8 access_time_ms; - __u8 reserved2[9]; + __u8 create_tz; + __u8 modify_tz; + __u8 access_tz; + __u8 reserved2[7]; } __attribute__((packed)) file; /* file directory entry */ struct { __u8 flags; @@ -198,6 +192,13 @@ struct exfat_dentry { __le32 start_clu; __le64 size; } __attribute__((packed)) upcase; /* up-case table directory entry */ + struct { + __u8 num_ext; + __le16 checksum; + __u16 flags; + __u8 guid[VOLUME_GUID_LEN]; + __u8 reserved[10]; + } __attribute__((packed)) guid; /* volume GUID directory entry */ } __attribute__((packed)) dentry; } __attribute__((packed));