aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-01-31 11:40:34 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-01-31 11:40:34 +0200
commit1dcf48d11246dcc69ca28dbb345cb53b12b7d7de (patch)
treebf38ebeb633468f1d80ee208701fbe43720c720c /Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
parent59fee3a258ff15567d21021b661f27d0a6958f8c (diff)
parentbf69a053dcec41d2a38ea63d5e0cb10453190136 (diff)
downloadTango-1dcf48d11246dcc69ca28dbb345cb53b12b7d7de.tar.gz
Tango-1dcf48d11246dcc69ca28dbb345cb53b12b7d7de.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
index 49f65a764..bba8a61be 100644
--- a/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
+++ b/Software/Embedded_SW/Embedded/Common/SWUpdate/FileSystem.c
@@ -296,7 +296,7 @@ uint32_t DeleteRequestFunc(MessageContainer* requestContainer)
DIR dir;
FILINFO* fno = 0;
- int NumOfFiles = 0;
+ //int NumOfFiles = 0;
FRESULT Fresult = FR_OK;
Fresult |= f_opendir(&dir, g_cCwdBuf);
@@ -701,9 +701,6 @@ FRESULT FileOpen(char *path, uint32_t *Size, FIL *FileHandle)
{
FRESULT Fresult = FR_OK;
FILINFO* fno = 0;
- void* buffer = NULL;
- uint32_t Bytes = 0;
- uint32_t status = 0;
fno = my_malloc(sizeof(FILINFO));
if (fno == 0)
@@ -713,9 +710,11 @@ FRESULT FileOpen(char *path, uint32_t *Size, FIL *FileHandle)
*Size = (uint32_t)fno->fsize;
if (Fresult == FR_OK)
{
- FileHandle = my_malloc(sizeof(FIL));
+ //FileHandle = my_malloc(sizeof(FIL));
if (FileHandle == 0)
Fresult = FR_DENIED;
+ else
+ Fresult = f_open(FileHandle,path,FA_READ);
}
else
{