mufs: fix offset calculation in mufs_seek()
This commit is contained in:
parent
23b478e582
commit
adbd045af5
1 changed files with 2 additions and 2 deletions
|
@ -75,8 +75,8 @@ long mufs_seek(struct mufs_file *file, long offset, int whence)
|
|||
|
||||
switch (whence) {
|
||||
case SEEK_SET: break;
|
||||
case SEEK_CUR: offset = file->va + offset; break;
|
||||
case SEEK_END: offset = file->tree->file_size; break;
|
||||
case SEEK_CUR: offset += file->va; break;
|
||||
case SEEK_END: offset += file->tree->file_size; break;
|
||||
default: return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue