* 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:
return -1;
break;
}
-
+
/* Bound check */
if (seek_pos + offset > fd->size)
{