#include "cfg/cfg_kfile.h"
#include <cfg/debug.h>
+#include <cfg/log.h>
#include <mware/formatwr.h>
*/
kfile_off_t kfile_genericSeek(struct KFile *fd, kfile_off_t offset, KSeekMode whence)
{
- uint32_t seek_pos;
+ kfile_off_t seek_pos;
switch (whence)
{
break;
}
+ #if LOG_LEVEL >= LOG_LVL_INFO
/* Bound check */
if (seek_pos + offset > fd->size)
- {
- ASSERT(0);
- return EOF;
- }
+ LOG_INFO("seek outside EOF\n");
+ #endif
fd->seek_pos = seek_pos + offset;
return fd;
}
+/**
+ * Close file \a fd.
+ * This is a generic implementation that only return 0.
+ */
+int kfile_genericClose(UNUSED_ARG(struct KFile *, fd))
+{
+ return 0;
+};
+