Merge pull request #3105 from opentx/projectkk2glider/lua_additions_for_next

Lua addition ported from master to next
This commit is contained in:
Bertrand Songis
2015-11-25 22:56:36 +01:00
11 changed files with 87 additions and 41 deletions
+4 -3
View File
@@ -845,7 +845,7 @@ FRESULT f_open (FIL * fil, const TCHAR *name, BYTE flag)
fil->fs = (FATFS*)fopen(realPath, (flag & FA_WRITE) ? ((flag & FA_CREATE_ALWAYS) ? "wb+" : "ab+") : "rb+");
fil->fptr = 0;
if (fil->fs) {
TRACE("f_open(%s, %x) = %p", path, flag, (FILE*)fil->fs);
TRACE("f_open(%s, %x) = %p (FIL %p)", path, flag, fil->fs, fil);
return FR_OK;
}
TRACE("f_open(%s) = error %d (%s)", path, errno, strerror(errno));
@@ -894,8 +894,9 @@ UINT f_size(FIL* fil)
FRESULT f_close (FIL * fil)
{
if (fil && fil->fs) {
TRACE("f_close(%p)", (FILE*)fil->fs);
assert(fil);
TRACE("f_close(%p) (FIL:%p)", fil->fs, fil);
if (fil->fs) {
fclose((FILE*)fil->fs);
fil->fs = NULL;
}