Rev 5808 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | |
2 | #define __KOS_IO_H__ |
||
3 | |||
4 | |||
5808 | serge | 5 | extern "C" { |
6 | #endif |
||
7 | |||
8 | |||
4349 | Serge | 9 | typedef struct |
10 | { |
||
11 | char sec; |
||
12 | char min; |
||
13 | char hour; |
||
14 | char rsv; |
||
15 | }detime_t; |
||
16 | |||
17 | |||
18 | { |
||
19 | char day; |
||
20 | char month; |
||
21 | short year; |
||
22 | }dedate_t; |
||
23 | |||
24 | |||
25 | { |
||
26 | unsigned attr; |
||
27 | unsigned flags; |
||
28 | union |
||
29 | { |
||
30 | detime_t ctime; |
||
31 | unsigned cr_time; |
||
32 | }; |
||
33 | union |
||
34 | { |
||
35 | dedate_t cdate; |
||
36 | unsigned cr_date; |
||
37 | }; |
||
38 | union |
||
39 | { |
||
40 | detime_t atime; |
||
41 | unsigned acc_time; |
||
42 | }; |
||
43 | union |
||
44 | { |
||
45 | dedate_t adate; |
||
46 | unsigned acc_date; |
||
47 | }; |
||
48 | union |
||
49 | { |
||
50 | detime_t mtime; |
||
51 | unsigned mod_time; |
||
52 | }; |
||
53 | union |
||
54 | { |
||
55 | dedate_t mdate; |
||
56 | unsigned mod_date; |
||
57 | }; |
||
58 | unsigned size; |
||
59 | unsigned size_high; |
||
60 | } fileinfo_t; |
||
61 | |||
62 | |||
63 | |||
64 | |||
65 | int get_fileinfo(const char *path, fileinfo_t *info); |
||
66 | int set_fileinfo(const char *path, fileinfo_t *info); |
||
6777 | siemargl | 67 | int read_file(const char *path, void *buff, |
4349 | Serge | 68 | size_t offset, size_t count, size_t *reads); |
69 | int write_file(const char *path,const void *buff, |
||
70 | size_t offset, size_t count, size_t *writes); |
||
71 | int set_file_size(const char *path, unsigned size); |
||
72 | void unpack(void* packed_data, void* unpacked_data) __attribute__((stdcall)) ; |
||
4806 | Serge | 73 | |
4349 | Serge | 74 | |
75 | { |
||
76 | __asm__ __volatile__( |
||
77 | "int $0x40" |
||
78 | ::"a"(30),"b"(1),"c"(cwd)); |
||
79 | }; |
||
80 | |||
81 | |||
5808 | serge | 82 | } |
83 | #endif |
||
4349 | Serge | 84 | #endif |
5808 | serge | 85 |