projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some warnings; remove unneeded inclusions.
[bertos.git]
/
bertos
/
kern
/
kfile.c
diff --git
a/bertos/kern/kfile.c
b/bertos/kern/kfile.c
index 22da2a70f3f3fdf76c41f3218ec1ba1df9f560bb..5a44019d6914148c4e0a888419aea6b6905e9947 100644
(file)
--- a/
bertos/kern/kfile.c
+++ b/
bertos/kern/kfile.c
@@
-42,6
+42,7
@@
#include "cfg/cfg_kfile.h"
#include <cfg/debug.h>
#include "cfg/cfg_kfile.h"
#include <cfg/debug.h>
+#include <cfg/log.h>
#include <mware/formatwr.h>
#include <mware/formatwr.h>
@@
-194,12
+195,11
@@
kfile_off_t kfile_genericSeek(struct KFile *fd, kfile_off_t offset, KSeekMode wh
break;
}
break;
}
+ #if LOG_LEVEL >= LOG_LVL_INFO
/* Bound check */
if (seek_pos + offset > fd->size)
/* 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;
fd->seek_pos = seek_pos + offset;
@@
-218,4
+218,13
@@
struct KFile * kfile_genericReopen(struct KFile *fd)
return fd;
}
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;
+};
+