- LOG_INFO("Flash file opened\n");
-}
-
-
-/**
- * Move \a fd file seek position of \a offset bytes from \a whence.
- *
- */
-static kfile_off_t flash_at91_seek(struct KFile *_fd, kfile_off_t offset, KSeekMode whence)
-{
- FlashAt91 *fd = FLASHAT91_CAST(_fd);
- kfile_off_t seek_pos;
-
- switch (whence)
- {
-
- case KSM_SEEK_SET:
- seek_pos = FLASH_BASE + FLASH_BOOT_SIZE;
- break;
- case KSM_SEEK_END:
- seek_pos = fd->fd.size;
- break;
- case KSM_SEEK_CUR:
- seek_pos = fd->fd.seek_pos;
- break;
- default:
- ASSERT(0);
- return EOF;
- break;
- }
-
- #if LOG_LEVEL >= LOG_LVL_INFO
- /* Bound check */
- if (seek_pos + offset > fd->fd.size)
- LOG_INFO("seek outside EOF\n");
- #endif
-
- fd->fd.seek_pos = seek_pos + offset;
-
- return fd->fd.seek_pos - (FLASH_BASE + FLASH_BOOT_SIZE);
-}
-
-/**
- * Reopen file \a fd
- */
-static struct KFile *flash_at91_reopen(struct KFile *_fd)
-{
- FlashAt91 *fd = FLASHAT91_CAST(_fd);
- flash_at91_close(_fd);
- flash_at91_open(fd);
-
- return _fd;
+ LOG_INFO("Flash file opened, pos %ld, size %ld\n", fd->fd.seek_pos, fd->fd.size);