summaryrefslogtreecommitdiff
path: root/components/drivers/serial
diff options
context:
space:
mode:
authorxiao-mang <[email protected]>2023-07-24 09:12:35 +0800
committerGitHub <[email protected]>2023-07-24 09:12:35 +0800
commitbefa95145115492c5c521f513b6ff075b0efdc80 (patch)
tree5aad5415138ce20d8fb9040a92ed6b859d90cbbb /components/drivers/serial
parentfc28baeb15f56db409533b52d2a85a772fff4cd1 (diff)
modify some function prototypes of the dfs_file_ops structure and the function declarations based on it (#7849)
Diffstat (limited to 'components/drivers/serial')
-rw-r--r--components/drivers/serial/serial.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c
index fd904078f7..1777a231b3 100644
--- a/components/drivers/serial/serial.c
+++ b/components/drivers/serial/serial.c
@@ -136,9 +136,9 @@ static int serial_fops_ioctl(struct dfs_file *fd, int cmd, void *args)
}
#ifdef RT_USING_DFS_V2
-static int serial_fops_read(struct dfs_file *fd, void *buf, size_t count, off_t *pos)
+static ssize_t serial_fops_read(struct dfs_file *fd, void *buf, size_t count, off_t *pos)
#else
-static int serial_fops_read(struct dfs_file *fd, void *buf, size_t count)
+static ssize_t serial_fops_read(struct dfs_file *fd, void *buf, size_t count)
#endif
{
int size = 0;
@@ -174,9 +174,9 @@ static int serial_fops_read(struct dfs_file *fd, void *buf, size_t count)
}
#ifdef RT_USING_DFS_V2
-static int serial_fops_write(struct dfs_file *fd, const void *buf, size_t count, off_t *pos)
+static ssize_t serial_fops_write(struct dfs_file *fd, const void *buf, size_t count, off_t *pos)
#else
-static int serial_fops_write(struct dfs_file *fd, const void *buf, size_t count)
+static ssize_t serial_fops_write(struct dfs_file *fd, const void *buf, size_t count)
#endif
{
rt_device_t device;