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:
yukangzhi
2025-08-04 10:58:42 +08:00
committed by Xiang Xiao
parent 14efe537bd
commit 53e8c008f5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;
}
/****************************************************************************