Changeset acb866ae in mainline
- Timestamp:
- 2012-02-16T22:13:10Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9744f2d
- Parents:
- 116cb91
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkexfat/exfat.h
r116cb91 racb866ae 33 33 34 34 #include <sys/types.h> 35 #include <stdint.h> 36 #include <bool.h> 37 38 #define EXFAT_FILENAME_LEN 255 39 #define EXFAT_NAME_PART_LEN 15 40 41 #define EXFAT_TYPE_UNUSED 0x00 42 #define EXFAT_TYPE_USED 0x80 43 #define EXFAT_TYPE_VOLLABEL 0x83 44 #define EXFAT_TYPE_BITMAP 0x81 45 #define EXFAT_TYPE_UCTABLE 0x82 46 #define EXFAT_TYPE_GUID 0xA0 47 #define EXFAT_TYPE_FILE 0x85 48 #define EXFAT_TYPE_STREAM 0xC0 49 #define EXFAT_TYPE_NAME 0xC1 50 51 #define EXFAT_ATTR_RDONLY 0x01 52 #define EXFAT_ATTR_HIDDEN 0x02 53 #define EXFAT_ATTR_SYSTEM 0x04 54 #define EXFAT_ATTR_SUBDIR 0x10 55 #define EXFAT_ATTR_ARCHIVE 0x20 56 57 58 /* All dentry structs should have 31 byte size */ 59 typedef struct { 60 uint8_t size; 61 uint16_t label[11]; 62 uint8_t _reserved[8]; 63 } __attribute__ ((packed)) exfat_vollabel_dentry_t; 64 65 typedef struct { 66 uint8_t flags; 67 uint8_t _reserved[18]; 68 uint32_t firstc; 69 uint64_t size; 70 } __attribute__ ((packed)) exfat_bitmap_dentry_t; 71 72 typedef struct { 73 uint8_t _reserved1[3]; 74 uint32_t checksum; 75 uint8_t _reserved2[12]; 76 uint32_t firstc; 77 uint64_t size; 78 } __attribute__ ((packed)) exfat_uctable_dentry_t; 79 80 typedef struct { 81 uint8_t count; /* Always zero */ 82 uint16_t checksum; 83 uint16_t flags; 84 uint8_t guid[16]; 85 uint8_t _reserved[10]; 86 } __attribute__ ((packed)) exfat_guid_dentry_t; 87 88 typedef struct { 89 uint8_t count; 90 uint16_t checksum; 91 uint16_t attr; 92 uint8_t _reserved1[2]; 93 uint32_t ctime; 94 uint32_t mtime; 95 uint32_t atime; 96 uint8_t ctime_fine; 97 uint8_t mtime_fine; 98 uint8_t ctime_tz; 99 uint8_t mtime_tz; 100 uint8_t atime_tz; 101 uint8_t _reserved2[7]; 102 } __attribute__ ((packed)) exfat_file_dentry_t; 103 104 typedef struct { 105 uint8_t flags; 106 uint8_t _reserved1[1]; 107 uint8_t name_size; 108 uint16_t hash; 109 uint8_t _reserved2[2]; 110 uint64_t valid_data_size; 111 uint8_t _reserved3[4]; 112 uint32_t firstc; 113 uint64_t data_size; 114 } __attribute__ ((packed)) exfat_stream_dentry_t; 115 116 typedef struct { 117 uint8_t flags; 118 uint16_t name[EXFAT_NAME_PART_LEN]; 119 } __attribute__ ((packed)) exfat_name_dentry_t; 120 121 122 typedef struct { 123 uint8_t type; 124 union { 125 exfat_vollabel_dentry_t vollabel; 126 exfat_bitmap_dentry_t bitmap; 127 exfat_uctable_dentry_t uctable; 128 exfat_guid_dentry_t guid; 129 exfat_file_dentry_t file; 130 exfat_stream_dentry_t stream; 131 exfat_name_dentry_t name; 132 }; 133 } __attribute__ ((packed)) exfat_dentry_t; 134 135 136 typedef enum { 137 EXFAT_DENTRY_SKIP, 138 EXFAT_DENTRY_LAST, 139 EXFAT_DENTRY_FREE, 140 EXFAT_DENTRY_VOLLABEL, 141 EXFAT_DENTRY_BITMAP, 142 EXFAT_DENTRY_UCTABLE, 143 EXFAT_DENTRY_GUID, 144 EXFAT_DENTRY_FILE, 145 EXFAT_DENTRY_STREAM, 146 EXFAT_DENTRY_NAME 147 } exfat_dentry_clsf_t; 148 35 149 36 150 typedef struct exfat_bs {
Note:
See TracChangeset
for help on using the changeset viewer.