projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sam3x-ek: set system clock at 84 MHz
[bertos.git]
/
bertos
/
fs
/
fat.c
diff --git
a/bertos/fs/fat.c
b/bertos/fs/fat.c
index aca2fa30d4a9078e504a4cb2a724b0d382fe10fc..c6118863c3a399de36ea4cf2e7b8980e6f1d3d81 100644
(file)
--- a/
bertos/fs/fat.c
+++ b/
bertos/fs/fat.c
@@
-32,7
+32,6
@@
*
* \brief FatFS: kfile interface for FatFS module by ChaN.
*
*
* \brief FatFS: kfile interface for FatFS module by ChaN.
*
- * \version $Id$
*
* \author Luca Ottaviano <lottaviano@develer.com>
*
*
* \author Luca Ottaviano <lottaviano@develer.com>
*
@@
-72,14
+71,12
@@
static kfile_off_t fatfile_seek(struct KFile *_fd, kfile_off_t offset, KSeekMode
* don't clip at end-of-file when in write mode
*/
FatFile *fd = FATFILE_CAST(_fd);
* don't clip at end-of-file when in write mode
*/
FatFile *fd = FATFILE_CAST(_fd);
- DWORD lseek_offset;
+ DWORD lseek_offset
= 0
;
switch (whence)
{
case KSM_SEEK_SET:
if (offset > 0)
lseek_offset = (DWORD) offset;
switch (whence)
{
case KSM_SEEK_SET:
if (offset > 0)
lseek_offset = (DWORD) offset;
- else
- lseek_offset = 0;
break;
case KSM_SEEK_CUR:
if (offset > 0)
break;
case KSM_SEEK_CUR:
if (offset > 0)
@@
-88,8
+85,6
@@
static kfile_off_t fatfile_seek(struct KFile *_fd, kfile_off_t offset, KSeekMode
{
if (fd->fat_file.fptr > (DWORD) (-offset))
lseek_offset = fd->fat_file.fptr - (DWORD)(-offset);
{
if (fd->fat_file.fptr > (DWORD) (-offset))
lseek_offset = fd->fat_file.fptr - (DWORD)(-offset);
- else
- lseek_offset = 0;
}
break;
case KSM_SEEK_END:
}
break;
case KSM_SEEK_END:
@@
-99,8
+94,6
@@
static kfile_off_t fatfile_seek(struct KFile *_fd, kfile_off_t offset, KSeekMode
{
if (fd->fat_file.fsize > (DWORD) (-offset))
lseek_offset = fd->fat_file.fsize + (DWORD) offset;
{
if (fd->fat_file.fsize > (DWORD) (-offset))
lseek_offset = fd->fat_file.fsize + (DWORD) offset;
- else
- lseek_offset = 0;
}
break;
}
}
break;
}
@@
-136,7
+129,7
@@
static void fatfile_clearerr(struct KFile *_fd)
FRESULT fatfile_open(FatFile *file, const char *file_path, BYTE mode)
{
FRESULT fatfile_open(FatFile *file, const char *file_path, BYTE mode)
{
-
file->fd._type = KFT_FATFILE
;
+
DB(file->fd._type = KFT_FATFILE)
;
file->fd.read = fatfile_read;
file->fd.write = fatfile_write;
file->fd.reopen = 0;
file->fd.read = fatfile_read;
file->fd.write = fatfile_write;
file->fd.reopen = 0;