aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/SWUpdate
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-12-10 00:06:49 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-12-10 00:06:49 +0200
commit8cf2490a30fd21959cea4baa0afc9cdced434593 (patch)
treee58cb252de8a7a9b56b79c324bdc3d41f642f5ef /Software/Embedded_SW/Embedded/Common/SWUpdate
parentb4062b0eace7983126d87001739ddcd3ad9c2c32 (diff)
downloadTango-8cf2490a30fd21959cea4baa0afc9cdced434593.tar.gz
Tango-8cf2490a30fd21959cea4baa0afc9cdced434593.zip
file handling
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
index f3d42b01a..a59a14dcf 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
@@ -794,8 +794,11 @@ FRESULT FileWrite(void * buffer, uint16_t size,char *path, uint32_t timeout)
{
LOG_ERROR (Fresult,"fwrite error");
}
- //LOG_ERROR (Bytes,"f_write ok no of bytes");
- Report("f_write ok no of bytes", __FILE__, __LINE__, Bytes, RpWarning, (int)size, 0);
+ else
+ {
+ //LOG_ERROR (Bytes,"f_write ok no of bytes");
+ Report("f_write ok no of bytes", __FILE__, __LINE__, Bytes, RpWarning, (int)size, 0);
+ }
f_close(FileHandle);
}
else
@@ -875,12 +878,14 @@ FRESULT FileRead(char *path, uint32_t *Size, void **Buffer)
}
else
{
- LOG_ERROR (Fresult,"malloc error");
+ Report("malloc error", __FILE__, __LINE__, Fresult, RpWarning, (int)fno->fsize, 0);
+ Fresult = FR_DENIED;
}
}
else
{
- LOG_ERROR (Fresult,"f_stat error");
+ Report("f_stat error", __FILE__, __LINE__, Fresult, RpWarning, (int)0, 0);
+ Fresult = FR_DENIED;
}
my_free(fno);
return Fresult;