mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
Merge branch 'RT-Thread:master' into ioctl
This commit is contained in:
@@ -11,8 +11,9 @@
|
||||
#include <rthw.h>
|
||||
#include <rtdevice.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
#if defined(RT_USING_POSIX)
|
||||
#ifdef RT_USING_POSIX
|
||||
#include <dfs_file.h>
|
||||
#include <dfs_posix.h>
|
||||
#include <dfs_poll.h>
|
||||
@@ -375,7 +376,7 @@ rt_size_t rt_pipe_read(rt_device_t device, rt_off_t pos, void *buffer, rt_size_t
|
||||
|
||||
if (device == RT_NULL)
|
||||
{
|
||||
rt_set_errno(-EINVAL);
|
||||
rt_set_errno(EINVAL);
|
||||
return 0;
|
||||
}
|
||||
if (count == 0) return 0;
|
||||
@@ -403,7 +404,7 @@ rt_size_t rt_pipe_write(rt_device_t device, rt_off_t pos, const void *buffer, rt
|
||||
|
||||
if (device == RT_NULL)
|
||||
{
|
||||
rt_set_errno(-EINVAL);
|
||||
rt_set_errno(EINVAL);
|
||||
return 0;
|
||||
}
|
||||
if (count == 0) return 0;
|
||||
@@ -517,12 +518,12 @@ int rt_pipe_delete(const char *name)
|
||||
}
|
||||
else
|
||||
{
|
||||
result = -ENODEV;
|
||||
result = -RT_EINVAL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = -ENODEV;
|
||||
result = -RT_EINVAL;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user