From dd627629f1eea3f4227976c0e6b6787664cd9b48 Mon Sep 17 00:00:00 2001
From: wdfk-prog <1425075683@qq.com>
Date: Fri, 7 Nov 2025 10:49:58 +0800
Subject: [PATCH] =?UTF-8?q?fix:[dfs]ls=E5=9C=A8=E6=96=87=E4=BB=B6=E5=90=8D?=
=?UTF-8?q?=E5=A4=AA=E9=95=BF=E6=97=B6=E6=89=93=E5=8D=B0=E5=87=BA=E6=9D=A5?=
=?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D=E4=B8=8E=E5=A4=A7=E5=B0=8F?=
=?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=9C=A8=E4=B8=80=E8=B5=B7,=E6=97=A0?=
=?UTF-8?q?=E6=B3=95=E5=8C=BA=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/dfs/dfs_v1/src/dfs_file.c | 4 ++--
components/dfs/dfs_v2/src/dfs_file.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
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