If whence is SEEK_END, the file offset shall be set to the size of the file plus offset. Noted by eunb.song@samsung.com

This commit is contained in:
Gregory Nutt 2017-03-13 07:31:47 -06:00
parent b9bb9ea853
commit 2bcb8b7b07
1 changed files with 1 additions and 1 deletions

View File

@ -1044,7 +1044,7 @@ static off_t smartfs_seek_internal(struct smartfs_mountpt_s *fs,
break;
case SEEK_END:
newpos = sf->entry.datlen - offset;
newpos = sf->entry.datlen + offset;
break;
}