From c9a1245977cada92477836fad2fc07171d5f301c Mon Sep 17 00:00:00 2001 From: yangpeng Date: Thu, 10 Oct 2024 16:12:42 +0800 Subject: [PATCH] =?UTF-8?q?[components][dfs][dfs=5Fv1]cat=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E5=AE=9E=E9=99=85=E8=AF=BB=E5=8F=96=E7=9A=84=E9=95=BF?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/dfs_v1/src/dfs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dfs/dfs_v1/src/dfs_file.c b/components/dfs/dfs_v1/src/dfs_file.c index acdc124f9a..bfe1920513 100644 --- a/components/dfs/dfs_v1/src/dfs_file.c +++ b/components/dfs/dfs_v1/src/dfs_file.c @@ -846,7 +846,7 @@ void cat(const char *filename) { buffer[length] = '\0'; rt_device_t out_device = rt_console_get_device(); - rt_device_write(out_device, 0, (void *)buffer, sizeof(buffer)); + rt_device_write(out_device, 0, (void *)buffer, length); } } while (length > 0); rt_kprintf("\n");