{"id":53,"date":"2012-05-31T20:06:25","date_gmt":"2012-05-31T12:06:25","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=53"},"modified":"2012-05-31T20:06:25","modified_gmt":"2012-05-31T12:06:25","slug":"exfat%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f%e7%bb%93%e6%9e%84","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/53.html","title":{"rendered":"exFAT\u6587\u4ef6\u7cfb\u7edf\u7ed3\u6784"},"content":{"rendered":"<pre class=\"brush:cpp; toolbar: true; auto-links: true;\">struct exfat_super_block\r\n{\r\n\tuint8_t jump[3];\t\t\t\t\/* 0x00 jmp and nop instructions *\/\r\n\tuint8_t oem_name[8];\t\t\t\/* 0x03 \"EXFAT   \" *\/\r\n\tuint8_t\t__unused1[53];\t\t\t\/* 0x0B always 0 *\/\r\n\tle64_t sector_start;\t\t\t\/* 0x40 partition first sector *\/\r\n\tle64_t sector_count;\t\t\t\/* 0x48 partition sectors count *\/\r\n\tle32_t fat_sector_start;\t\t\/* 0x50 FAT first sector *\/\r\n\tle32_t fat_sector_count;\t\t\/* 0x54 FAT sectors count *\/\r\n\tle32_t cluster_sector_start;\t\/* 0x58 first cluster sector *\/\r\n\tle32_t cluster_count;\t\t\t\/* 0x5C total clusters count *\/\r\n\tle32_t rootdir_cluster;\t\t\t\/* 0x60 first cluster of the root dir *\/\r\n\tle32_t volume_serial;\t\t\t\/* 0x64 volume serial number *\/\r\n\tstruct\t\t\t\t\t\t\t\/* 0x68 FS version *\/\r\n\t{\r\n\t\tuint8_t minor;\r\n\t\tuint8_t major;\r\n\t}\r\n\tversion;\r\n\tle16_t volume_state;\t\t\t\/* 0x6A volume state flags *\/\r\n\tuint8_t sector_bits;\t\t\t\/* 0x6C sector size as (1 &lt;&lt; n) *\/\r\n\tuint8_t spc_bits;\t\t\t\t\/* 0x6D sectors per cluster as (1 &lt;&lt; n) *\/\r\n\tuint8_t fat_count;\t\t\t\t\/* 0x6E always 1 *\/\r\n\tuint8_t drive_no;\t\t\t\t\/* 0x6F always 0x80 *\/\r\n\tuint8_t allocated_percent;\t\t\/* 0x70 percentage of allocated space *\/\r\n\tuint8_t __unused2[397];\t\t\t\/* 0x71 always 0 *\/\r\n\tle16_t boot_signature;\t\t\t\/* the value of 0xAA55 *\/\r\n}\r\n\r\nstruct exfat_entry\t\t\t\t\t\/* common container for all entries *\/\r\n{\r\n\tuint8_t type;\t\t\t\t\t\/* any of EXFAT_ENTRY_xxx *\/\r\n\tuint8_t data[31];\r\n}\r\n\r\nstruct exfat_entry_bitmap\t\t\t\/* allocated clusters bitmap *\/\r\n{\r\n\tuint8_t type;\t\t\t\t\t\/* EXFAT_ENTRY_BITMAP *\/\r\n\tuint8_t __unknown1[19];\r\n\tle32_t start_cluster;\r\n\tle64_t size;\t\t\t\t\t\/* in bytes *\/\r\n}\r\n\r\nstruct exfat_entry_upcase\t\t\t\/* upper case translation table *\/\r\n{\r\n\tuint8_t type;\t\t\t\t\t\/* EXFAT_ENTRY_UPCASE *\/\r\n\tuint8_t __unknown1[3];\r\n\tle32_t checksum;\r\n\tuint8_t __unknown2[12];\r\n\tle32_t start_cluster;\r\n\tle64_t size;\t\t\t\t\t\/* in bytes *\/\r\n}\r\n\r\nstruct exfat_entry_label\t\t\t\/* volume label *\/\r\n{\r\n\tuint8_t type;\t\t\t\t\t\/* EXFAT_ENTRY_LABEL *\/\r\n\tuint8_t length;\t\t\t\t\t\/* number of characters *\/\r\n\tle16_t name[EXFAT_ENAME_MAX];\t\/* in UTF-16LE *\/\r\n}\r\n\r\nstruct exfat_entry_meta1\t\t\t\/* file or directory info (part 1) *\/\r\n{\r\n\tuint8_t type;\t\t\t\t\t\/* EXFAT_ENTRY_FILE *\/\r\n\tuint8_t continuations;\r\n\tle16_t checksum;\r\n\tle16_t attrib;\t\t\t\t\t\/* combination of EXFAT_ATTRIB_xxx *\/\r\n\tle16_t __unknown1;\r\n\tle16_t crtime, crdate;\t\t\t\/* creation date and time *\/\r\n\tle16_t mtime, mdate;\t\t\t\/* latest modification date and time *\/\r\n\tle16_t atime, adate;\t\t\t\/* latest access date and time *\/\r\n\tuint8_t crtime_cs;\t\t\t\t\/* creation time in cs (centiseconds) *\/\r\n\tuint8_t mtime_cs;\t\t\t\t\/* latest modification time in cs *\/\r\n\tuint8_t __unknown2[10];\r\n}\r\n\r\nstruct exfat_entry_meta2\t\t\t\/* file or directory info (part 2) *\/\r\n{\r\n\tuint8_t type;\t\t\t\t\t\/* EXFAT_ENTRY_FILE_INFO *\/\r\n\tuint8_t flags;\t\t\t\t\t\/* combination of EXFAT_FLAG_xxx *\/\r\n\tuint8_t __unknown1;\r\n\tuint8_t name_length;\r\n\tle16_t name_hash;\r\n\tle16_t __unknown2;\r\n\tle64_t real_size;\t\t\t\t\/* in bytes, equals to size *\/\r\n\tuint8_t __unknown3[4];\r\n\tle32_t start_cluster;\r\n\tle64_t size;\t\t\t\t\t\/* in bytes, equals to real_size *\/\r\n}\r\n\r\nstruct exfat_entry_name\t\t\t\t\/* file or directory name *\/\r\n{\r\n\tuint8_t type;\t\t\t\t\t\/* EXFAT_ENTRY_FILE_NAME *\/\r\n\tuint8_t __unknown;\r\n\tle16_t name[EXFAT_ENAME_MAX];\t\/* in UTF-16LE *\/\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>struct exfat_super_block { uint8_t jump[3]; \/* 0x00 jmp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[52,82,97],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-Technical_literature","tag-exfat","tag-82","tag-97"],"views":1945,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}