FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/comlib/cl_imei.c @ 892:eed6dc6aca3c
gsm-fw/comlib/cl_imei.c: hell with TI's different return code types
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 29 Jun 2015 22:57:27 +0000 |
parents | f3fba126778a |
children |
comparison
equal
deleted
inserted
replaced
891:f3fba126778a | 892:eed6dc6aca3c |
---|---|
191 | ERROR - negative values | 191 | ERROR - negative values |
192 +------------------------------------------------------------------------------ | 192 +------------------------------------------------------------------------------ |
193 */ | 193 */ |
194 extern BYTE cl_get_imeisv(USHORT imeiBufSize, UBYTE *imeiBufPtr, UBYTE imeiType) | 194 extern BYTE cl_get_imeisv(USHORT imeiBufSize, UBYTE *imeiBufPtr, UBYTE imeiType) |
195 { | 195 { |
196 #if CONFIG_MOKOFFS | |
196 USHORT ret; | 197 USHORT ret; |
197 #if CONFIG_MOKOFFS | |
198 UBYTE version; | 198 UBYTE version; |
199 UBYTE buf[SIZE_EF_IMEI]; | 199 UBYTE buf[SIZE_EF_IMEI]; |
200 #else | |
201 BYTE ret; | |
200 #endif | 202 #endif |
201 | 203 |
202 TRACE_FUNCTION("cl_get_imeisv()"); | 204 TRACE_FUNCTION("cl_get_imeisv()"); |
203 | 205 |
204 /* | 206 /* |
256 * /etc/IMEISV (sensible nibble order, not encrypted) | 258 * /etc/IMEISV (sensible nibble order, not encrypted) |
257 * Pirelli's encrypted IMEI record (Pirelli target only) | 259 * Pirelli's encrypted IMEI record (Pirelli target only) |
258 * hard-coded fallback and error indication | 260 * hard-coded fallback and error indication |
259 */ | 261 */ |
260 | 262 |
261 ret = ffs_file_read(CL_IMEI_FFS_PATH, imeiBufPtr, CL_IMEI_SIZE); | 263 if (ffs_file_read(CL_IMEI_FFS_PATH, imeiBufPtr, CL_IMEI_SIZE) >= EFFS_OK) { |
262 if (ret >= EFFS_OK) { | |
263 memcpy(stored_imei, imeiBufPtr, CL_IMEI_SIZE); | 264 memcpy(stored_imei, imeiBufPtr, CL_IMEI_SIZE); |
264 imei_flag = 1; | 265 imei_flag = 1; |
265 return CL_IMEI_OK; | 266 return CL_IMEI_OK; |
266 } | 267 } |
267 #if CONFIG_TARGET_PIRELLI | 268 #if CONFIG_TARGET_PIRELLI |