diff --git a/components/dfs/dfs_v1/src/dfs_file.c b/components/dfs/dfs_v1/src/dfs_file.c
index dce75a9f103..75bbd219bca 100644
--- a/components/dfs/dfs_v1/src/dfs_file.c
+++ b/components/dfs/dfs_v1/src/dfs_file.c
@@ -830,11 +830,11 @@ void ls(const char *pathname)
rt_kprintf("%-20s", dirent.d_name);
if (S_ISDIR(stat.st_mode))
{
- rt_kprintf("%-25s\n", "
");
+ rt_kprintf(" %-25s\n", "");
}
else
{
- rt_kprintf("%-25lu\n", (unsigned long)stat.st_size);
+ rt_kprintf(" %-25lu\n", (unsigned long)stat.st_size);
}
}
else
diff --git a/components/dfs/dfs_v2/src/dfs_file.c b/components/dfs/dfs_v2/src/dfs_file.c
index 54f6ca6bc1f..9c6e383e1b4 100644
--- a/components/dfs/dfs_v2/src/dfs_file.c
+++ b/components/dfs/dfs_v2/src/dfs_file.c
@@ -2597,7 +2597,7 @@ void ls(const char *pathname)
if (S_ISDIR(stat.st_mode))
{
rt_kprintf(_COLOR_BLUE "%-20s" _COLOR_NORMAL, dirent.d_name);
- rt_kprintf("%-25s\n", "");
+ rt_kprintf(" %-25s\n", "");
}
else if (S_ISLNK(stat.st_mode))
{
@@ -2655,17 +2655,17 @@ void ls(const char *pathname)
else if (stat.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))
{
rt_kprintf(_COLOR_GREEN "%-20s" _COLOR_NORMAL, dirent.d_name);
- rt_kprintf("%-25lu\n", (unsigned long)stat.st_size);
+ rt_kprintf(" %-25lu\n", (unsigned long)stat.st_size);
}
else if (S_ISCHR(stat.st_mode))
{
rt_kprintf(_COLOR_YELLOW "%-20s" _COLOR_NORMAL, dirent.d_name);
- rt_kprintf("%-25s\n", "");
+ rt_kprintf(" %-25s\n", "");
}
else
{
rt_kprintf("%-20s", dirent.d_name);
- rt_kprintf("%-25lu\n", (unsigned long)stat.st_size);
+ rt_kprintf(" %-25lu\n", (unsigned long)stat.st_size);
}
}
else