mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
fs: Fix the incorrect return value of the lseek interface.
The lseek interface needs to return the new offset in file. Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
This commit is contained in:
+1
-1
@@ -579,7 +579,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
|
||||
errout_with_lock:
|
||||
nxrmutex_unlock(&rm->rm_lock);
|
||||
return ret;
|
||||
return ret < 0 ? ret : position;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user