annotate src/condat/com/include/ffs_coat.h @ 216:2be687f4476c default tip

l1_init.c: sync with Tourmaline: L1 recovery ABB init fix
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 31 Oct 2022 01:23:14 +0000
parents 6e457872f745
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Modul : ffs_coat
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 +-----------------------------------------------------------------------------
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 | Copyright 2002 Texas Instruments Berlin, AG
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | All rights reserved.
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 |
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 | This file is confidential and a trade secret of Texas
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | Instruments Berlin, AG
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | The receipt of or possession of this file does not convey
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | any rights to reproduce or disclose its contents or to
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | manufacture, use, or sell anything it may describe, in
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | whole, or in part, without the specific written consent of
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | Texas Instruments Berlin, AG.
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 +-----------------------------------------------------------------------------
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 | Purpose : Encapsulate the FFS API.
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 +-----------------------------------------------------------------------------
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #ifndef FFS_COAT_H
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #define FFS_COAT_H
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #if defined(_TMS470)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #define FFS_COAT_ENABLED
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #endif /* _TMS470 */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #undef FFS_COAT_ENABLED
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #if defined(FFS_COAT_ENABLED)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #ifdef TI_PS_HCOMM_CHANGE
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #define FFS_open(path,flags) _FFS_open(path,flags,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #define FFS_write(fd,p,size) _FFS_write(fd,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #define FFS_read(fd,p,size) _FFS_read(fd,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #define FFS_seek(fd,off,whence) _FFS_seek(fd,off,whence,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #define FFS_opendir(path,dir) _FFS_opendir(path,dir,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #define FFS_readdir(dir,p,size) _FFS_readdir(dir,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #define FFS_readlink(path,p,size) _FFS_readlink(path,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #define FFS_file_read(path,p,size) _FFS_file_read(path,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #define FFS_fread(path,p,size) _FFS_fread(path,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 /* FFS functions which return a value EFFS_OK if OK */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #define FFS_preformat(magic) _FFS_preformat(magic,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 #define FFS_format(name,magic) _FFS_format(name,magic,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #define FFS_close(fd) _FFS_close(fd,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #define FFS_truncate(path,length) _FFS_truncate(path,length,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #define FFS_ftruncate(fd,length) _FFS_ftruncate(fd,length,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #define FFS_fdatasync(fd) _FFS_fdatasync(fd,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #define FFS_stat(name,stat) _FFS_stat(name,stat,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #define FFS_fstat(fd,stat) _FFS_fstat(fd,stat,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #define FFS_lstat(name,stat) _FFS_lstat(name,stat,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #define FFS_linkstat(name,stat) _FFS_linkstat(name,stat,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #define FFS_xlstat(name,stat) _FFS_xlstat(name,stat,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #define FFS_remove(name) _FFS_remove(name,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #define FFS_mkdir(path) _FFS_mkdir(path,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 #define FFS_symlink(name,path) _FFS_symlink(name,path,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #define FFS_rename(oldname,newname) _FFS_rename(oldname,newname,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #define FFS_file_write(name,addr,size,flags) _FFS_file_write(name,addr,size,flags,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #define FFS_fcreate(path,p,size) _FFS_fcreate(path,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #define FFS_fupdate(name,addr,size) _FFS_fupdate(name,addr,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #define FFS_fwrite(path,p,size) _FFS_fwrite(path,p,size,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #define FFS_fcontrol(path,type,param) _FFS_fcontrol(path,type,param,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 #define FFS_query(query,p) _FFS_query(query,p,_hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 /* FFS functions whose positive return value has a meaning */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #else
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #define FFS_open(path,flags) _FFS_open(path,flags,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 #define FFS_write(fd,p,size) _FFS_write(fd,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #define FFS_read(fd,p,size) _FFS_read(fd,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #define FFS_seek(fd,off,whence) _FFS_seek(fd,off,whence,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 #define FFS_opendir(path,dir) _FFS_opendir(path,dir,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 #define FFS_readdir(dir,p,size) _FFS_readdir(dir,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 #define FFS_readlink(path,p,size) _FFS_readlink(path,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 #define FFS_file_read(path,p,size) _FFS_file_read(path,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 #define FFS_fread(path,p,size) _FFS_fread(path,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 /* FFS functions which return a value EFFS_OK if OK */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 #define FFS_preformat(magic) _FFS_preformat(magic,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #define FFS_format(name,magic) _FFS_format(name,magic,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 #define FFS_close(fd) _FFS_close(fd,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 #define FFS_truncate(path,length) _FFS_truncate(path,length,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 #define FFS_ftruncate(fd,length) _FFS_ftruncate(fd,length,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 #define FFS_fdatasync(fd) _FFS_fdatasync(fd,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 #define FFS_stat(name,stat) _FFS_stat(name,stat,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 #define FFS_fstat(fd,stat) _FFS_fstat(fd,stat,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 #define FFS_lstat(name,stat) _FFS_lstat(name,stat,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 #define FFS_linkstat(name,stat) _FFS_linkstat(name,stat,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 #define FFS_xlstat(name,stat) _FFS_xlstat(name,stat,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 #define FFS_remove(name) _FFS_remove(name,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 #define FFS_mkdir(path) _FFS_mkdir(path,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 #define FFS_symlink(name,path) _FFS_symlink(name,path,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 #define FFS_rename(oldname,newname) _FFS_rename(oldname,newname,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 #define FFS_file_write(name,addr,size,flags) _FFS_file_write(name,addr,size,flags,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 #define FFS_fcreate(path,p,size) _FFS_fcreate(path,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 #define FFS_fupdate(name,addr,size) _FFS_fupdate(name,addr,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 #define FFS_fwrite(path,p,size) _FFS_fwrite(path,p,size,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 #define FFS_fcontrol(path,type,param) _FFS_fcontrol(path,type,param,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 #define FFS_query(query,p) _FFS_query(query,p,hCommMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 #endif
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 /* prototypes */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 T_FFS_FD _FFS_open(const char *name, T_FFS_OPEN_FLAGS option,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 T_FFS_SIZE _FFS_write(T_FFS_FD fdi, void *src, T_FFS_SIZE amount,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 T_FFS_SIZE _FFS_read(T_FFS_FD fdi, void *src, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 T_FFS_SIZE _FFS_seek(T_FFS_FD fdi, T_FFS_SIZE offset, T_FFS_WHENCE whence,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 T_FFS_SIZE _FFS_opendir(const char *name, T_FFS_DIR *dir,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 T_FFS_SIZE _FFS_readdir (T_FFS_DIR *dir, char *name, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 T_FFS_SIZE _FFS_readlink(const char *name, char *addr, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 T_FFS_SIZE _FFS_file_read(const char *name, void *addr, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 T_FFS_SIZE _FFS_fread(const char *name, void *addr, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 T_FFS_RET _FFS_preformat(UINT16 magic,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 T_FFS_RET _FFS_format(const char *name, UINT16 magic,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 T_FFS_RET _FFS_close(T_FFS_FD fdi,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 T_FFS_RET _FFS_truncate(const char *path, T_FFS_OFFSET length,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 T_FFS_RET _FFS_ftruncate(T_FFS_FD fdi, T_FFS_OFFSET length,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 T_FFS_RET _FFS_fdatasync(T_FFS_FD fdi,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 T_FFS_RET _FFS_stat(const char *name, T_FFS_STAT *stat,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 T_FFS_RET _FFS_fstat(T_FFS_FD fdi, T_FFS_STAT *stat,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 T_FFS_RET _FFS_lstat(const char *name, T_FFS_STAT *stat,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 T_FFS_RET _FFS_xlstat(const char *name, T_FFS_XSTAT *stat,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 T_FFS_RET _FFS_linkstat(const char *name, T_FFS_STAT *stat,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 T_FFS_RET _FFS_remove(const char *name,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 T_FFS_RET _FFS_mkdir(const char *name,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 T_FFS_RET _FFS_symlink(const char *name, const char *actualpath,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 T_FFS_RET _FFS_rename(const char *oldname, const char *newname,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 T_FFS_RET _FFS_file_write(const char *name, void *addr, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 T_FFS_OPEN_FLAGS flags,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 T_FFS_RET _FFS_fcreate(const char *name, void *addr, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 T_FFS_RET _FFS_fupdate(const char *name, void *addr, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 T_FFS_RET _FFS_fwrite(const char *name, void *addr, T_FFS_SIZE size,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 T_FFS_RET _FFS_fcontrol(const char *pathname, INT8 action, int param,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 T_FFS_RET _FFS_query(INT8 query, void *p,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 #else /* FFS_COAT_ENABLED */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 /* FFS functions whose positive return value has a meaning */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 #define FFS_open(path,flags) ffs_open(path,flags)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 #define FFS_write(fd,p,size) ffs_write(fd,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 #define FFS_read(fd,p,size) ffs_read(fd,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 #define FFS_seek(fd,off,whence) ffs_seek(fd,off,whence)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #define FFS_opendir(path,dir) ffs_opendir(path,dir)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 #define FFS_readdir(dir,p,size) ffs_readdir(dir,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 #define FFS_readlink(path,p,size) ffs_readlink(path,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 #define FFS_file_read(path,p,size) ffs_file_read(path,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 #define FFS_fread(path,p,size) ffs_fread(path,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 /* FFS functions which return a value EFFS_OK if OK */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 #define FFS_preformat(magic) ffs_preformat(magic)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 #define FFS_format(name,magic) ffs_format(name,magic)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #define FFS_close(fd) ffs_close(fd)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 #define FFS_truncate(path,length) ffs_truncate(path,length)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 #define FFS_ftruncate(fd,length) ffs_ftruncate(fd,length)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 #define FFS_fdatasync(fd) ffs_fdatasync(fd)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 #define FFS_stat(name,stat) ffs_stat(name,stat)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 #define FFS_fstat(fd,stat) ffs_fstat(fd,stat)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 #define FFS_lstat(name,stat) ffs_lstat(name,stat)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 #define FFS_linkstat(name,stat) ffs_linkstat(name,stat)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 #define FFS_xlstat(name,stat) ffs_xlstat(name,stat)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 #define FFS_remove(name) ffs_remove(name)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 #define FFS_mkdir(path) ffs_mkdir(path)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 #define FFS_symlink(name,path) ffs_symlink(name,path)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 #define FFS_rename(oldname,newname) ffs_rename(oldname,newname)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 #define FFS_file_write(name,addr,size,flags) ffs_file_write(name,addr,size,flags)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 #define FFS_fcreate(path,p,size) ffs_fcreate(path,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 #define FFS_fupdate(name,addr,size) ffs_fupdate(name,addr,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 #define FFS_fwrite(path,p,size) ffs_fwrite(path,p,size)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 #define FFS_fcontrol(path,type,param) ffs_fcontrol(path,type,param)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 #define FFS_query(query,p) ffs_query(query,p)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 #endif /* FFS_COAT_ENABLED */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 #define FFS_Check(fct) _FFS_StateCheck(fct,hMMI,__FILE__,__LINE__)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 GLOBAL T_FFS_RET _FFS_StateCheck (const char * const fct,
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 T_HANDLE hMMI, const char * const file, int line);
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 #if !defined(SYST_TRACE)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 #if defined(NEW_FRAME)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 #define SYST_TRACE(a) vsi_o_ttrace(0, 0xFFFF,a)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 #define SYST 0, 0xffff
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 #define SYST_TRACE_P(a) vsi_o_ttrace a
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 #else
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 #define SYST_TRACE(a) vsi_o_trace("", 0xFFFF,a)
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 #define SYST "", 0xffff
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 #define SYST_TRACE_P(a) vsi_o_trace a
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 #endif
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 /*
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 * use it as showed next line...
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 * SYST_TRACE_P((SYST, "e.g. two parameter: %d %d", p1, p2));
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 #endif /* !SYST_TRACE */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 #endif /* !FFS_COAT_H */
6e457872f745 src/condat: hybrid import from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218