Rev 3262 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3262 | Rev 3263 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | import sys |
33 | import sys |
34 | import os |
34 | import os |
35 | import xstruct |
35 | import xstruct |
36 | 36 | ||
37 | HEADER = """little: |
37 | HEADER = """little: |
38 | char[5] tag /* 'TMPFS' */ |
38 | char tag[5] /* 'TMPFS' */ |
39 | """ |
39 | """ |
40 | 40 | ||
41 | DENTRY_NONE = """little: |
41 | DENTRY_NONE = """little: |
42 | uint8_t kind /* NONE */ |
42 | uint8_t kind /* NONE */ |
43 | uint32_t fname_len /* 0 */ |
43 | uint32_t fname_len /* 0 */ |
44 | """ |
44 | """ |
45 | 45 | ||
46 | DENTRY_FILE = """little: |
46 | DENTRY_FILE = """little: |
47 | uint8_t kind /* FILE */ |
47 | uint8_t kind /* FILE */ |
48 | uint32_t fname_len /* filename length */ |
48 | uint32_t fname_len /* filename length */ |
49 | char[%d] fname /* filename */ |
49 | char fname[%d] /* filename */ |
50 | uint32_t flen /* file length */ |
50 | uint32_t flen /* file length */ |
51 | """ |
51 | """ |
52 | 52 | ||
53 | DENTRY_DIRECTORY = """little: |
53 | DENTRY_DIRECTORY = """little: |
54 | uint8_t kind /* DIRECTORY */ |
54 | uint8_t kind /* DIRECTORY */ |
55 | uint32_t fname_len /* filename length */ |
55 | uint32_t fname_len /* filename length */ |
56 | char[%d] fname /* filename */ |
56 | char fname[%d] /* filename */ |
57 | """ |
57 | """ |
58 | 58 | ||
59 | TMPFS_NONE = 0 |
59 | TMPFS_NONE = 0 |
60 | TMPFS_FILE = 1 |
60 | TMPFS_FILE = 1 |
61 | TMPFS_DIRECTORY = 2 |
61 | TMPFS_DIRECTORY = 2 |