From: batt Date: Thu, 4 Oct 2007 19:43:59 +0000 (+0000) Subject: Update to new KFile prototypes and constans. X-Git-Tag: 1.0.0~414 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=4228cc95b2a7bb119f20040b3cf7d9d199f5d489;p=bertos.git Update to new KFile prototypes and constans. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@827 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/drv/flash_avr.c b/drv/flash_avr.c index 4ae4f231..811b06b0 100755 --- a/drv/flash_avr.c +++ b/drv/flash_avr.c @@ -185,19 +185,19 @@ static bool flash_avr_close(UNUSED_ARG(struct _KFile *,fd)) * Move \a fd file seek position of \a offset bytes * from current position. */ -static int32_t flash_avr_seek(struct _KFile *fd, int32_t offset, int whence) +static int32_t flash_avr_seek(struct _KFile *fd, int32_t offset, KSeekMode whence) { uint32_t seek_pos; switch(whence) { - case SEEK_SET: + case KSM_SEEK_SET: seek_pos = 0; break; - case SEEK_END: + case KSM_SEEK_END: seek_pos = fd->size - 1; break; - case SEEK_CUR: + case KSM_SEEK_CUR: seek_pos = fd->seek_pos; break; default: @@ -205,7 +205,7 @@ static int32_t flash_avr_seek(struct _KFile *fd, int32_t offset, int whence) return -1; break; } - + /* Bound check */ if (seek_pos + offset > fd->size) {