annotate gsm-fw/g23m-glue/gdi/ffs_coat.c @ 1007:3bfeee466b0a

gsm-fw feature tch-reroute: downlink sending implemented
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 20 Mar 2016 19:31:39 +0000
parents a963ff26848a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 | Modul : ffs_coat
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 | Copyright 2002 Texas Instruments Berlin, AG
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 | All rights reserved.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 |
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 | This file is confidential and a trade secret of Texas
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9 | Instruments Berlin, AG
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 | The receipt of or possession of this file does not convey
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 | any rights to reproduce or disclose its contents or to
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 | manufacture, use, or sell anything it may describe, in
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13 | whole, or in part, without the specific written consent of
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 | Texas Instruments Berlin, AG.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 | Purpose : Encapsulate the FFS API.
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 +-----------------------------------------------------------------------------
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 #ifndef __FFS_COAT_C__
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 #define __FFS_COAT_C__
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 /*==== INCLUDES ===================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 #define SAP_ACI
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25
838
a963ff26848a gdi/ffs_coat.c: added boilerplate includes just in case
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 837
diff changeset
26 #include "config.h"
a963ff26848a gdi/ffs_coat.c: added boilerplate includes just in case
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 837
diff changeset
27 #include "fixedconf.h"
a963ff26848a gdi/ffs_coat.c: added boilerplate includes just in case
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 837
diff changeset
28 #include "condat-features.h"
a963ff26848a gdi/ffs_coat.c: added boilerplate includes just in case
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 837
diff changeset
29
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
30 #include "typedefs.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
31 #include "pconst.cdg"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "prim.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
33 #include "vsi.h"
837
80959c73a21b gdi: ffs_coat.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 831
diff changeset
34 #include "../../services/ffs/ffs.h"
831
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
35 #include "ffs_coat.h"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
36
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
37
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
38 /*==== CONSTANTS ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
39
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
40 /*==== TYPES ======================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
41
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42 /*==== CONSTANTS ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
43 //#define FFS_STATE_CHECK
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
44 #define FFS_PAR_CHECK
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
45 #define FFS_ERR_CHECK
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
46
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
47 /*==== EXTERNALS ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
48
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
49 /*==== VARIABLES ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
50
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
51 /*==== MACROS =====================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
52 #if defined(FFS_STATE_CHECK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
53 #define _STATE_CHECK(ffs_ret)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
54 {ffs_ret=_FFS_StateCheck (_FFS_FCT_NAME,hMMI,file,line);\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
55 if (ffs_ret NEQ EFFS_OK)return ffs_ret;}
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
56 #else /* FFS_PAR_CHECK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
57 #define _STATE_CHECK(ffs_ret)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
58 #endif /* FFS_PAR_CHECK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
59
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
60 #if defined(FFS_PAR_CHECK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
61 #define _PAR_CHECK_NULL(parname,parnumber,ret)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
62 if (!parname){\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
63 _FFS_ParCheck ("NULL", _FFS_FCT_NAME, parnumber, hMMI,file, line);\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
64 return ret;}
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
65
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
66 #define _PAR_CHECK_LESSZERO(parname,parnumber,ret)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
67 if (parname < 0){\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
68 _FFS_ParCheck ("<0", _FFS_FCT_NAME, parnumber, hMMI,file, line);\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
69 return ret;}
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
70 #else /* FFS_PAR_CHECK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
71 #define _PAR_CHECK_NULL(parname,parnumber,ret)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
72 #define _PAR_CHECK_LESSZERO(parname,parnumber,ret)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
73 #endif /* FFS_PAR_CHECK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
74
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
75
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
76 #if defined(FFS_ERR_CHECK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
77 #define _ERROR_CHECK(ffs_ret)\
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
78 if (ffs_ret < 0)_FFS_ErrorMsg(NULL, _FFS_FCT_NAME, ffs_ret, hMMI,file, line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
79 #else /* FFS_ERR_CHECK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
80 #define _ERROR_CHECK(ffs_ret)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
81 #endif /* FFS_ERR_CHECK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
82
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
83 /*==== FUNCTIONS ==================================================*/
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
84 #if defined(FFS_COAT_ENABLED)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
85 static void _FFS_ParCheck (const char * const errmsg, const char * const fct,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
86 int parameter,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
87 T_HANDLE hMMI, const char * const file, int line);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
88
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
89 static void _FFS_ErrorMsg (const char * const errmsg, const char * const fct,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
90 int ffs_ret,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
91 T_HANDLE hMMI, const char * const file, int line);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
92
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
93 /* FFS functions whose positive return value has a meaning */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
94 T_FFS_FD _FFS_open(const char *name, T_FFS_OPEN_FLAGS option,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
95 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
96 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
97 #define _FFS_FCT_NAME "ffs_open"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
98 T_FFS_FD ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
99
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
100 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
101 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
102
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
103 ffs_ret = ffs_open (name, option);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
104 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
105
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
106 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
107 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
108 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
109
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
110 T_FFS_SIZE _FFS_write(T_FFS_FD fdi, void *src, T_FFS_SIZE amount,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
111 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
112 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
113 #define _FFS_FCT_NAME "ffs_write"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
114 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
115
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
116 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
117 _PAR_CHECK_NULL (src, 2, EFFS_BADOP);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
118
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
119 ffs_ret = ffs_write (fdi, src, amount);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
120 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
121
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
122 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
123 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
124 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
125
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
126
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
127 T_FFS_SIZE _FFS_read(T_FFS_FD fdi, void *src, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
128 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
129 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
130 #define _FFS_FCT_NAME "ffs_read"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
131 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
132
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
133 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
134 _PAR_CHECK_NULL (src, 2, EFFS_BADOP);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
135
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
136 ffs_ret = ffs_read (fdi, src, size);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
137 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
138
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
139 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
140 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
141 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
142
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
143
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
144 T_FFS_SIZE _FFS_seek(T_FFS_FD fdi, T_FFS_SIZE offset, T_FFS_WHENCE whence,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
145 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
146 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
147 #define _FFS_FCT_NAME "ffs_seek"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
148 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
149
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
150 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
151 _PAR_CHECK_LESSZERO (offset, 2, EFFS_BADOP);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
152
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
153 ffs_ret = ffs_seek (fdi, offset, whence);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
154 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
155
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
156 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
157 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
158 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
159
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
160
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
161 T_FFS_SIZE _FFS_opendir(const char *name, T_FFS_DIR *dir,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
162 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
163 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
164 #define _FFS_FCT_NAME "ffs_opendir"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
165 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
166
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
167 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
168 _PAR_CHECK_NULL (name, 1, EFFS_NOTADIR);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
169 _PAR_CHECK_NULL (dir, 2, EFFS_NOTADIR);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
170
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
171 ffs_ret = ffs_opendir (name, dir);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
172 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
173
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
174 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
175 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
176 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
177
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
178
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
179 T_FFS_SIZE _FFS_readdir (T_FFS_DIR *dir, char *name, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
180 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
181 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
182 #define _FFS_FCT_NAME "ffs_readdir"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
183 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
184
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
185 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
186 _PAR_CHECK_NULL (dir, 1, EFFS_NOTADIR);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
187 _PAR_CHECK_NULL (name, 2, EFFS_NOTADIR);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
188 _PAR_CHECK_LESSZERO (size, 3, EFFS_NOTADIR);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
189
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
190 ffs_ret = ffs_readdir (dir, name, size);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
191 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
192
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
193 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
194 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
195 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
196
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
197
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
198 T_FFS_SIZE _FFS_readlink(const char *name, char *addr, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
199 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
200 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
201 #define _FFS_FCT_NAME "ffs_readlink"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
202 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
203
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
204 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
205 _PAR_CHECK_NULL (name, 1, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
206 _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
207 _PAR_CHECK_LESSZERO (size, 3, EFFS_FILETOOBIG);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
208
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
209 ffs_ret = ffs_readlink (name, addr, size);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
210 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
211
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
212 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
213 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
214 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
215
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
216
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
217 T_FFS_SIZE _FFS_file_read(const char *name, void *addr, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
218 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
219 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
220 #define _FFS_FCT_NAME "ffs_file_read"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
221 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
222
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
223 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
224 _PAR_CHECK_NULL (name, 1, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
225 _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
226 _PAR_CHECK_LESSZERO (size, 3, EFFS_FILETOOBIG);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
227
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
228 ffs_ret = ffs_file_read (name, addr, size);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
229 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
230
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
231 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
232 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
233 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
234
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
235
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
236 T_FFS_SIZE _FFS_fread(const char *name, void *addr, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
237 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
238 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
239 #define _FFS_FCT_NAME "ffs_fread"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
240 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
241
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
242 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
243 _PAR_CHECK_NULL (name, 1, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
244 _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
245 _PAR_CHECK_LESSZERO (size, 3, EFFS_FILETOOBIG);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
246
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
247 /* ffs_fread is deprecated, use ffs_file_read instead */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
248 ffs_ret = ffs_file_read (name, addr, size);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
249 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
250
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
251 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
252 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
253 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
254
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
255
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
256
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
257 /* FFS functions which return a value EFFS_OK if OK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
258 T_FFS_RET _FFS_preformat(UINT16 magic,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
259 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
260 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
261 #define _FFS_FCT_NAME "ffs_preformat"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
262 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
263
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
264 ffs_ret = ffs_preformat (magic);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
265 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
266
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
267 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
268 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
269 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
270
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
271
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
272 T_FFS_RET _FFS_format(const char *name, UINT16 magic,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
273 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
274 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
275 #define _FFS_FCT_NAME "ffs_format"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
276 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
277
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
278 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
279
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
280 ffs_ret = ffs_format (name, magic);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
281 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
282
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
283 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
284 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
285 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
286
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
287
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
288 T_FFS_RET _FFS_close(T_FFS_FD fdi,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
289 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
290 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
291 #define _FFS_FCT_NAME "ffs_close"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
292 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
293
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
294 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
295
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
296 ffs_ret = ffs_close (fdi);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
297 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
298
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
299 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
300 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
301 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
302
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
303
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
304 T_FFS_RET _FFS_truncate(const char *path, T_FFS_OFFSET length,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
305 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
306 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
307 #define _FFS_FCT_NAME "ffs_truncate"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
308 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
309
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
310 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
311 _PAR_CHECK_NULL (path, 1, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
312 _PAR_CHECK_LESSZERO (length, 2, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
313
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
314 ffs_ret = ffs_truncate (path, length);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
315 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
316
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
317 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
318 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
319 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
320
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
321
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
322 T_FFS_RET _FFS_ftruncate(T_FFS_FD fdi, T_FFS_OFFSET length,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
323 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
324 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
325 #define _FFS_FCT_NAME "ffs_ftruncate"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
326 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
327
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
328 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
329 _PAR_CHECK_NULL (fdi, 1, EFFS_BADFD);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
330 _PAR_CHECK_LESSZERO (length, 2, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
331
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
332 ffs_ret = ffs_ftruncate (fdi, length);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
333 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
334
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
335 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
336 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
337 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
338
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
339
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
340 T_FFS_RET _FFS_fdatasync(T_FFS_FD fdi,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
341 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
342 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
343 #define _FFS_FCT_NAME "ffs_fdatasync"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
344 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
345
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
346 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
347 _PAR_CHECK_NULL (fdi, 1, EFFS_BADFD);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
348
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
349 ffs_ret = ffs_fdatasync (fdi);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
350 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
351
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
352 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
353 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
354 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
355
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
356
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
357 T_FFS_RET _FFS_stat(const char *name, T_FFS_STAT *stat,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
358 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
359 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
360 #define _FFS_FCT_NAME "ffs_stat"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
361 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
362
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
363 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
364 _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
365 _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
366
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
367 ffs_ret = ffs_stat (name, stat);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
368 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
369
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
370 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
371 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
372 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
373
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
374
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
375 T_FFS_RET _FFS_fstat(T_FFS_FD fdi, T_FFS_STAT *stat,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
376 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
377 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
378 #define _FFS_FCT_NAME "ffs_fstat"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
379 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
380
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
381 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
382 _PAR_CHECK_NULL (fdi, 1, EFFS_BADFD);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
383 _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
384
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
385 ffs_ret = ffs_fstat (fdi, stat);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
386 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
387
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
388 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
389 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
390 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
391
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
392
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
393 T_FFS_RET _FFS_lstat(const char *name, T_FFS_STAT *stat,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
394 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
395 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
396 #define _FFS_FCT_NAME "ffs_lstat"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
397 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
398
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
399 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
400 _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
401 _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
402
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
403 ffs_ret = ffs_lstat (name, stat);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
404 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
405
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
406 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
407 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
408 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
409
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
410
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
411 T_FFS_RET _FFS_xlstat(const char *name, T_FFS_XSTAT *stat,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
412 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
413 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
414 #define _FFS_FCT_NAME "ffs_xlstat"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
415 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
416
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
417 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
418 _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
419 _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
420
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
421 ffs_ret = ffs_xlstat (name, stat);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
422 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
423
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
424 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
425 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
426 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
427
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
428
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
429 T_FFS_RET _FFS_linkstat(const char *name, T_FFS_STAT *stat,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
430 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
431 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
432 #define _FFS_FCT_NAME "ffs_linkstat"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
433 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
434
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
435 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
436 _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
437 _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
438
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
439 /* ffs_linkstat is deprecated, use ffs_lstat instead */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
440 ffs_ret = ffs_lstat (name, stat);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
441 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
442
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
443 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
444 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
445 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
446
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
447
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
448 T_FFS_RET _FFS_remove(const char *name,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
449 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
450 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
451 #define _FFS_FCT_NAME "ffs_remove"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
452 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
453
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
454 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
455 _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
456
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
457 ffs_ret = ffs_remove (name);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
458 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
459
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
460 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
461 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
462 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
463
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
464
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
465 T_FFS_RET _FFS_mkdir(const char *name,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
466 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
467 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
468 #define _FFS_FCT_NAME "ffs_mkdir"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
469 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
470
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
471 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
472 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
473
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
474 ffs_ret = ffs_mkdir (name);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
475 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
476
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
477 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
478 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
479 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
480
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
481
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
482 T_FFS_RET _FFS_symlink(const char *name, const char *actualpath,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
483 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
484 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
485 #define _FFS_FCT_NAME "ffs_symlink"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
486 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
487
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
488 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
489 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
490 _PAR_CHECK_NULL (actualpath, 2, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
491
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
492 ffs_ret = ffs_symlink (name, actualpath);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
493 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
494
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
495 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
496 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
497 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
498
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
499
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
500 T_FFS_RET _FFS_rename(const char *oldname, const char *newname,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
501 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
502 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
503 #define _FFS_FCT_NAME "ffs_rename"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
504 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
505
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
506 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
507 _PAR_CHECK_NULL (oldname, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
508 _PAR_CHECK_NULL (newname, 2, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
509
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
510 ffs_ret = ffs_rename (oldname, newname);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
511 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
512
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
513 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
514 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
515 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
516
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
517
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
518 T_FFS_RET _FFS_file_write(const char *name, void *addr, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
519 T_FFS_OPEN_FLAGS flags,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
520 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
521 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
522 #define _FFS_FCT_NAME "ffs_file_write"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
523 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
524
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
525 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
526 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
527 _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
528 _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
529
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
530 ffs_ret = ffs_file_write (name, addr, size, flags);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
531 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
532
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
533 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
534 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
535 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
536
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
537
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
538 T_FFS_RET _FFS_fcreate(const char *name, void *addr, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
539 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
540 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
541 #define _FFS_FCT_NAME "ffs_fcreate"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
542 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
543
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
544 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
545 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
546 _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
547 _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
548
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
549 /* ffs_fcreate is deprecated, use ffs_file_write instead */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
550 ffs_ret = ffs_file_write (name, addr, size, FFS_O_CREATE|FFS_O_EXCL);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
551 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
552
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
553 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
554 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
555 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
556
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
557
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
558 T_FFS_RET _FFS_fupdate(const char *name, void *addr, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
559 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
560 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
561 #define _FFS_FCT_NAME "ffs_fupdate"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
562 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
563
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
564 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
565 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
566 _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
567 _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
568
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
569 /* ffs_fupdate is deprecated, use ffs_file_write instead */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
570 ffs_ret = ffs_file_write (name, addr, size, FFS_O_TRUNC);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
571 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
572
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
573 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
574 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
575 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
576
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
577
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
578 T_FFS_RET _FFS_fwrite(const char *name, void *addr, T_FFS_SIZE size,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
579 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
580 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
581 #define _FFS_FCT_NAME "ffs_fwrite"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
582 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
583
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
584 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
585 _PAR_CHECK_NULL (name, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
586 _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
587 _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
588
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
589 /* ffs_fwrite is deprecated, use ffs_file_write instead */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
590 ffs_ret = ffs_file_write (name, addr, size, FFS_O_CREATE|FFS_O_TRUNC);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
591 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
592
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
593 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
594 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
595 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
596
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
597
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
598 T_FFS_RET _FFS_fcontrol(const char *pathname, INT8 action, int param,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
599 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
600 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
601 #define _FFS_FCT_NAME "ffs_fcontrol"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
602 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
603
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
604 _STATE_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
605 _PAR_CHECK_NULL (pathname, 1, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
606
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
607 ffs_ret = ffs_fcontrol (pathname, action, param);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
608 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
609
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
610 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
611 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
612 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
613
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
614
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
615 T_FFS_RET _FFS_query(INT8 query, void *p,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
616 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
617 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
618 #define _FFS_FCT_NAME "ffs_query"
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
619 T_FFS_SIZE ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
620
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
621 _PAR_CHECK_NULL (p, 2, EFFS_BADNAME);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
622
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
623 ffs_ret = ffs_query (query, p);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
624 _ERROR_CHECK (ffs_ret);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
625
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
626 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
627 #undef _FFS_FCT_NAME
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
628 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
629
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
630 #if defined(FFS_PAR_CHECK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
631 static void _FFS_ParCheck (const char * const errmsg, const char * const fct,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
632 int parameter,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
633 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
634 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
635 char *f;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
636 int l;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
637
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
638 l = strlen (file);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
639 if (l <= 20)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
640 f = (char *)file;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
641 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
642 f = (char *)file + l - 20;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
643
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
644 TRACE_EVENT_P5 ("FFS PAR ERR:par %u of %s is %s (%s#%u)",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
645 parameter,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
646 fct ? fct : "",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
647 errmsg ? errmsg : "",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
648 f,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
649 line);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
650 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
651 #endif /* FFS_PAR_CHECK */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
652
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
653 char *ffs_strerror(effs_t error)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
654 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
655 switch (error) {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
656 case EFFS_OK: return "ok"; /* 0 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
657 case EFFS_NODEVICE: return "flash device unknown"; /* -1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
658 case EFFS_CORRUPTED: return "filesystem corrupted!?"; /* -2 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
659 case EFFS_NOPREFORMAT: return "ffs not preformatted"; /* -3 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
660 case EFFS_NOFORMAT: return "ffs not formatted"; /* -4 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
661 case EFFS_BADFORMAT: return "incompatible ffs version"; /* -5 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
662 case EFFS_MAGIC: return "bad magic"; /* -6 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
663 case EFFS_AGAIN: return "not ready, try again later"; /* -7 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
664 case EFFS_NOSYS: return "function not implemented"; /* -8 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
665 case EFFS_DRIVER: return "ffs device driver error"; /* -9 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
666 case EFFS_NOSPACE: return "out of data space"; /* -10 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
667 case EFFS_FSFULL: return "file system full, no free inodes"; /* -11 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
668 case EFFS_BADNAME: return "bad filename"; /* -12 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
669 case EFFS_NOTFOUND: return "object not found"; /* -13 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
670 case EFFS_EXISTS: return "object exists"; /* -14 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
671 case EFFS_ACCESS: return "access permission violation"; /* -15 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
672 case EFFS_NAMETOOLONG: return "filename too long"; /* -16 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
673 case EFFS_INVALID: return "invalid argument"; /* -17 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
674 case EFFS_DIRNOTEMPTY: return "directory not empty"; /* -18 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
675 case EFFS_NOTADIR: return "object is not a directory"; /* -19 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
676 case EFFS_SPARE: return "SPARE"; /* -20 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
677 case EFFS_FILETOOBIG: return "file too big"; /* -21 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
678 case EFFS_NOTAFILE: return "object is not a file"; /* -22 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
679 case EFFS_PATHTOODEEP: return "path too deep"; /* -23 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
680 case EFFS_NUMFD: return "Max number of open files reached"; /* -24 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
681 case EFFS_BADFD: return "Bad file descriptor"; /* -25 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
682 case EFFS_BADOP: return "Bad operation"; /* -26 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
683 case EFFS_LOCKED: return "The file is locked"; /* -27 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
684 case EFFS_TOOBIG: return "too big (tmffs buffer overflow)"; /* -30 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
685 case EFFS_MEMORY: return "out of memory"; /* -31 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
686 case EFFS_MSGSEND: return "message send failed"; /* -32 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
687 case EFFS_SIBLINGLOOP: return "directory sibling loop"; /* -40 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
688 case EFFS_NOBLOCKS: return "No more blocks!?"; /* -41 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
689 default: return "unknown ffs error code!";
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
690 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
691 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
692
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
693 static void _FFS_ErrorMsg (const char * const errmsg, const char * const fct,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
694 int ffs_ret,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
695 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
696 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
697 char *f;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
698 int l;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
699
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
700 l = strlen (file);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
701 if (l <= 20)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
702 f = (char *)file;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
703 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
704 f = (char *)file + l - 20;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
705
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
706 TRACE_EVENT_P5 ("FFS ERR on %s: %d %s (%s#%u)",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
707 fct ? fct : "",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
708 ffs_ret,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
709 ffs_strerror (ffs_ret),
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
710 f,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
711 line);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
712 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
713
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
714 #endif /* FFS_COAT_ENABLED */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
715
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
716 #if 1
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
717 GLOBAL T_FFS_RET _FFS_StateCheck (const char * const fct,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
718 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
719 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
720 int query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
721 int bytes_free, bytes_used, bytes_max, bytes_lost;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
722 T_FFS_RET ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
723
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
724 SYST_TRACE ("_FFS_StateCheck()");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
725
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
726 bytes_free = bytes_used = bytes_max = bytes_lost = 0;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
727
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
728 ffs_ret = ffs_query (Q_BYTES_FREE, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
729 if (ffs_ret EQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
730 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
731 bytes_free = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
732 ffs_ret = ffs_query (Q_BYTES_USED, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
733 if (ffs_ret EQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
734 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
735 bytes_used = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
736 ffs_ret = ffs_query (Q_BYTES_LOST, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
737 if (ffs_ret EQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
738 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
739 bytes_lost = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
740 ffs_ret = ffs_query (Q_BYTES_MAX, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
741 if (ffs_ret EQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
742 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
743 bytes_max = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
744 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
745 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
746 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
747 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
748
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
749 #if 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
750 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
751 char *f;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
752 int l;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
753
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
754 PALLOC (trc_ind, ACI_TRC_IND); /* T_ACI_TRC_IND */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
755 trc_ind->cmd_src = 1; /* CMD_SRC_ATI_1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
756
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
757 l = strlen (file);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
758 if (l <= 20)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
759 f = (char *)file;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
760 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
761 f = (char *)file + l - 20;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
762
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
763 sprintf (trc_ind->trc_buf, "STATE before %s (%s#%u)", fct?fct:"", f, line);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
764 trc_ind->trc_len = strlen (trc_ind->trc_buf);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
765
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
766 PSEND (hMMI, trc_ind);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
767 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
768 #endif /* 0|1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
769 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
770 TRACE_EVENT_P4 ("FFS free=%5u used=%5u lost=%5u max=%6u",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
771 bytes_free,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
772 bytes_used,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
773 bytes_lost,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
774 bytes_max);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
775 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
776
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
777 return EFFS_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
778 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
779 #else /* 1|0 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
780 GLOBAL T_FFS_RET _FFS_StateCheck (const char * const fct,
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
781 T_HANDLE hMMI, const char * const file, int line)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
782 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
783 USHORT query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
784 int objects_free, objects_used, objects_max, objects_lost;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
785 T_FFS_RET ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
786
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
787 SYST_TRACE ("_FFS_StateCheck()");
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
788
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
789 ffs_ret = ffs_query (Q_OBJECTS_FREE, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
790 if (ffs_ret NEQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
791 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
792 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
793 objects_free = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
794
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
795 ffs_ret = ffs_query (Q_INODES_USED, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
796 if (ffs_ret NEQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
797 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
798 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
799 objects_used = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
800
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
801 ffs_ret = ffs_query (Q_INODES_LOST, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
802 if (ffs_ret NEQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
803 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
804 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
805 objects_lost = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
806
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
807 ffs_ret = ffs_query (Q_OBJECTS_MAX, &query_result);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
808 if (ffs_ret NEQ EFFS_OK)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
809 return ffs_ret;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
810 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
811 objects_max = query_result;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
812
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
813 #if 0
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
814 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
815 char *f;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
816 int l;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
817
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
818 PALLOC (trc_ind, ACI_TRC_IND); /* T_ACI_TRC_IND */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
819 trc_ind->cmd_src = 1; /* CMD_SRC_ATI_1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
820
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
821 l = strlen (file);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
822 if (l <= 20)
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
823 f = (char *)file;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
824 else
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
825 f = (char *)file + l - 20;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
826
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
827 sprintf (trc_ind->trc_buf, "STATE before %s (%s#%u)", fct?fct:"", f, line);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
828 trc_ind->trc_len = strlen (trc_ind->trc_buf);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
829
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
830 PSEND (hMMI, trc_ind);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
831 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
832 #endif /* 0|1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
833 {
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
834 PALLOC (trc_ind, ACI_TRC_IND); /* T_ACI_TRC_IND */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
835 trc_ind->cmd_src = 1; /* CMD_SRC_ATI_1 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
836
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
837 sprintf (trc_ind->trc_buf, "FFS objs: free=%3u used=%3u lost=%3u max=%3u",
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
838 objects_free, objects_used, objects_lost, objects_max);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
839 trc_ind->trc_len = strlen (trc_ind->trc_buf);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
840
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
841 SYST_TRACE ((char *)trc_ind->trc_buf);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
842
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
843 PSEND (hMMI, trc_ind);
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
844 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
845
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
846 return EFFS_OK;
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
847 }
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
848 #endif /* 1|0 */
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
849
549b7ac60300 gsm-fw/g23m-glue/gdi/*.c: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
850 #endif