Rev 3504 | Rev 3628 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3504 | Rev 3505 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | */ |
31 | */ |
32 | 32 | ||
33 | #ifndef FAT_FAT_DENTRY_H_ |
33 | #ifndef FAT_FAT_DENTRY_H_ |
34 | #define FAT_FAT_DENTRY_H_ |
34 | #define FAT_FAT_DENTRY_H_ |
35 | 35 | ||
- | 36 | #include <stdint.h> |
|
- | 37 | ||
- | 38 | #define FAT_NAME_LEN 8 |
|
- | 39 | #define FAT_EXT_LEN 3 |
|
- | 40 | ||
- | 41 | #define FAT_ATTR_RDONLY (1 << 0) |
|
- | 42 | #define FAT_ATTR_VOLLABEL (1 << 3) |
|
- | 43 | #define FAT_ATTR_SUBDIR (1 << 4) |
|
- | 44 | ||
- | 45 | typedef enum { |
|
- | 46 | FAT_DENTRY_SKIP, |
|
- | 47 | FAT_DENTRY_LAST, |
|
- | 48 | FAT_DENTRY_VALID |
|
- | 49 | } fat_dentry_clsf_t; |
|
- | 50 | ||
- | 51 | typedef struct { |
|
- | 52 | uint8_t name[8]; |
|
- | 53 | uint8_t ext[3]; |
|
- | 54 | uint8_t attr; |
|
- | 55 | uint8_t reserved; |
|
- | 56 | uint8_t ctime_fine; |
|
- | 57 | uint16_t ctime; |
|
- | 58 | uint16_t cdate; |
|
- | 59 | uint16_t adate; |
|
- | 60 | union { |
|
- | 61 | uint16_t eaidx; /* FAT12/FAT16 */ |
|
- | 62 | uint16_t firstc_hi; /* FAT32 */ |
|
- | 63 | }; |
|
- | 64 | uint16_t mtime; |
|
- | 65 | uint16_t mdate; |
|
- | 66 | union { |
|
- | 67 | uint16_t firstc; /* FAT12/FAT16 */ |
|
- | 68 | uint16_t firstc_lo; /* FAT32 */ |
|
- | 69 | }; |
|
- | 70 | uint32_t size; |
|
- | 71 | } __attribute__ ((packed)) fat_dentry_t; |
|
- | 72 | ||
- | 73 | extern void dentry_name_canonify(fat_dentry_t *, char *); |
|
- | 74 | extern fat_dentry_clsf_t fat_classify_dentry(fat_dentry_t *); |
|
- | 75 | ||
36 | #endif |
76 | #endif |
37 | 77 | ||
38 | /** |
78 | /** |
39 | * @} |
79 | * @} |
40 | */ |
80 | */ |