[components][dfs][dfs_v1]cat输出实际读取的长度

This commit is contained in:
yangpeng 2024-10-10 16:12:42 +08:00 committed by Meco Man
parent 9b31631df1
commit c9a1245977
1 changed files with 1 additions and 1 deletions

View File

@ -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");