mirror of https://github.com/RT-Thread/rt-thread
fix_return_err
This commit is contained in:
parent
416ec66380
commit
afa17ed343
|
@ -265,7 +265,7 @@ static int dfs_devfs_flush(struct dfs_file *file)
|
||||||
|
|
||||||
static off_t dfs_devfs_lseek(struct dfs_file *file, off_t offset, int wherece)
|
static off_t dfs_devfs_lseek(struct dfs_file *file, off_t offset, int wherece)
|
||||||
{
|
{
|
||||||
off_t ret = 0;
|
off_t ret = -EPERM;
|
||||||
rt_device_t device;
|
rt_device_t device;
|
||||||
|
|
||||||
RT_ASSERT(file != RT_NULL);
|
RT_ASSERT(file != RT_NULL);
|
||||||
|
|
|
@ -461,7 +461,7 @@ ssize_t sys_write(int fd, const void *buf, size_t nbyte)
|
||||||
/* syscall: "lseek" ret: "off_t" args: "int" "off_t" "int" */
|
/* syscall: "lseek" ret: "off_t" args: "int" "off_t" "int" */
|
||||||
size_t sys_lseek(int fd, size_t offset, int whence)
|
size_t sys_lseek(int fd, size_t offset, int whence)
|
||||||
{
|
{
|
||||||
size_t ret = lseek(fd, offset, whence);
|
ssize_t ret = lseek(fd, offset, whence);
|
||||||
return (ret < 0 ? GET_ERRNO() : ret);
|
return (ret < 0 ? GET_ERRNO() : ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue