The current position of the flash is stored internally using the
absolute memory address, so KSM_SEEK_END should sum the flash base
address (FLASH_BASE) to the flash size.
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3838
38d2e660-2303-0410-9eaa-
f027e97ec537
seek_pos = FLASH_BASE;
break;
case KSM_SEEK_END:
seek_pos = FLASH_BASE;
break;
case KSM_SEEK_END:
- seek_pos = fd->fd.size;
+ seek_pos = FLASH_BASE + fd->fd.size;
break;
case KSM_SEEK_CUR:
seek_pos = fd->fd.seek_pos;
break;
case KSM_SEEK_CUR:
seek_pos = fd->fd.seek_pos;