fix_return

This commit is contained in:
zhujiale 2024-08-21 13:43:03 +08:00 committed by Bernard Xiong
parent afa17ed343
commit d086039608
2 changed files with 2 additions and 2 deletions

View File

@ -673,7 +673,7 @@ int sys_dup(int oldfd)
#ifdef RT_USING_SMART #ifdef RT_USING_SMART
return (sysret_t)newfd; return (sysret_t)newfd;
#else #else
return newfd; return newfd;
#endif #endif
} }

View File

@ -399,7 +399,7 @@ off_t lseek(int fd, off_t offset, int whence)
result = dfs_file_lseek(file, offset, whence); result = dfs_file_lseek(file, offset, whence);
if (result < 0) if (result < 0)
{ {
rt_set_errno(result); rt_set_errno(-EPERM);
return -1; return -1;
} }