diff options
Diffstat (limited to 'firmware/export/fat.h')
-rw-r--r-- | firmware/export/fat.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/export/fat.h b/firmware/export/fat.h index c56d8f85f6..4cdc479844 100644 --- a/firmware/export/fat.h +++ b/firmware/export/fat.h | |||
@@ -25,9 +25,17 @@ | |||
25 | 25 | ||
26 | #define SECTOR_SIZE 512 | 26 | #define SECTOR_SIZE 512 |
27 | 27 | ||
28 | /* Number of bytes reserved for a file name (including the trailing \0). | ||
29 | Since names are stored in the entry as UTF-8, we won't be able to | ||
30 | store all names allowed by FAT. In FAT, a name can have max 255 | ||
31 | characters (not bytes!). Since the UTF-8 encoding of a char may take | ||
32 | up to 4 bytes, there will be names that we won't be able to store | ||
33 | completely. For such names, the short DOS name is used. */ | ||
34 | #define FAT_FILENAME_BYTES 256 | ||
35 | |||
28 | struct fat_direntry | 36 | struct fat_direntry |
29 | { | 37 | { |
30 | unsigned char name[256]; /* Name plus \0 */ | 38 | unsigned char name[FAT_FILENAME_BYTES]; /* UTF-8 encoded name plus \0 */ |
31 | unsigned short attr; /* Attributes */ | 39 | unsigned short attr; /* Attributes */ |
32 | unsigned char crttimetenth; /* Millisecond creation | 40 | unsigned char crttimetenth; /* Millisecond creation |
33 | time stamp (0-199) */ | 41 | time stamp (0-199) */ |