mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-16 04:18:20 +00:00
rt_device_write/read return data type as rt_ssize_t
rt_ssize_t can give negative error code, which follows the unix style correctly
This commit is contained in:
committed by
Man, Jianting (Meco)
parent
890c1c9264
commit
f58d3c5200
@@ -12,12 +12,12 @@
|
||||
|
||||
static struct rt_device null_dev;
|
||||
|
||||
static rt_size_t null_read (rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size)
|
||||
static rt_ssize_t null_read (rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static rt_size_t null_write (rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size)
|
||||
static rt_ssize_t null_write (rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size)
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user