Rev 9058 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9058 | Rev 9186 | ||
---|---|---|---|
1 | #include |
1 | #include |
2 | 2 | ||
3 | #pragma pack(push,1) |
3 | #pragma pack(push,1) |
4 | typedef struct |
4 | typedef struct |
5 | { |
5 | { |
6 | char sec; |
6 | char sec; |
7 | char min; |
7 | char min; |
8 | char hour; |
8 | char hour; |
9 | char rsv; |
9 | char rsv; |
10 | }detime_t; |
10 | }detime_t; |
11 | 11 | ||
12 | typedef struct |
12 | typedef struct |
13 | { |
13 | { |
14 | char day; |
14 | char day; |
15 | char month; |
15 | char month; |
16 | short year; |
16 | short year; |
17 | }dedate_t; |
17 | }dedate_t; |
18 | 18 | ||
19 | typedef struct |
19 | typedef struct |
20 | { |
20 | { |
21 | unsigned attr; |
21 | unsigned attr; |
22 | unsigned flags; |
22 | unsigned flags; |
23 | union |
23 | union |
24 | { |
24 | { |
25 | detime_t ctime; |
25 | detime_t ctime; |
26 | unsigned cr_time; |
26 | unsigned cr_time; |
27 | }; |
27 | }; |
28 | union |
28 | union |
29 | { |
29 | { |
30 | dedate_t cdate; |
30 | dedate_t cdate; |
31 | unsigned cr_date; |
31 | unsigned cr_date; |
32 | }; |
32 | }; |
33 | union |
33 | union |
34 | { |
34 | { |
35 | detime_t atime; |
35 | detime_t atime; |
36 | unsigned acc_time; |
36 | unsigned acc_time; |
37 | }; |
37 | }; |
38 | union |
38 | union |
39 | { |
39 | { |
40 | dedate_t adate; |
40 | dedate_t adate; |
41 | unsigned acc_date; |
41 | unsigned acc_date; |
42 | }; |
42 | }; |
43 | union |
43 | union |
44 | { |
44 | { |
45 | detime_t mtime; |
45 | detime_t mtime; |
46 | unsigned mod_time; |
46 | unsigned mod_time; |
47 | }; |
47 | }; |
48 | union |
48 | union |
49 | { |
49 | { |
50 | dedate_t mdate; |
50 | dedate_t mdate; |
51 | unsigned mod_date; |
51 | unsigned mod_date; |
52 | }; |
52 | }; |
53 | unsigned size; |
53 | unsigned size; |
54 | unsigned size_high; |
54 | unsigned size_high; |
55 | } FILEINFO; |
55 | } FILEINFO; |
56 | #pragma pack(pop) |
56 | #pragma pack(pop) |
57 | 57 | ||
58 | int get_fileinfo(const char *path, FILEINFO *info) |
58 | int get_fileinfo(const char *path, FILEINFO *info) |
59 | { |
59 | { |
60 | ksys70_t k; |
- | |
61 | int err; |
60 | int err; |
- | 61 | ksys70_t k; |
|
62 | k.p00 = 5; |
62 | k.p00 = 5; |
- | 63 | k.p04dw = 0; |
|
- | 64 | k.p08dw = 0; |
|
- | 65 | k.p12 = 0; |
|
63 | k.bdfe = info; |
66 | k.bdfe = info; |
64 | k.p20 = 0; |
67 | k.p20 = 0; |
65 | k.p21 = path; |
68 | k.p21 = path; |
66 | return FS_Service(&k, &err); |
69 | return FS_Service(&k, &err); |
67 | } |
70 | } |
68 | - |