mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:57:16 +08: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
+2
-2
@@ -311,7 +311,7 @@ RTM_EXPORT(rt_device_close);
|
||||
*
|
||||
* @note the unit of size/pos is a block for block device.
|
||||
*/
|
||||
rt_size_t rt_device_read(rt_device_t dev,
|
||||
rt_ssize_t rt_device_read(rt_device_t dev,
|
||||
rt_off_t pos,
|
||||
void *buffer,
|
||||
rt_size_t size)
|
||||
@@ -354,7 +354,7 @@ RTM_EXPORT(rt_device_read);
|
||||
*
|
||||
* @note the unit of size/pos is a block for block device.
|
||||
*/
|
||||
rt_size_t rt_device_write(rt_device_t dev,
|
||||
rt_ssize_t rt_device_write(rt_device_t dev,
|
||||
rt_off_t pos,
|
||||
const void *buffer,
|
||||
rt_size_t size)
|
||||
|
||||
Reference in New Issue
Block a user