summaryrefslogtreecommitdiffstats
path: root/commands/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/ls.c')
-rw-r--r--commands/ls.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/commands/ls.c b/commands/ls.c
index e54991862d..e5e37d75c5 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -26,6 +26,15 @@
#include <getopt.h>
#include <stringlist.h>
+/*
+ * SIZELEN = strlen(itoa(MAX_LFS_FILESIZE)) + 1;
+ */
+#ifdef CONFIG_CPU_64
+#define SIZELEN 20
+#else
+#define SIZELEN 14
+#endif
+
static void ls_one(const char *path, const char* fullname)
{
char modestr[11];
@@ -38,7 +47,8 @@ static void ls_one(const char *path, const char* fullname)
return;
mkmodestr(s.st_mode, modestr);
- printf("%s %14llu %*.*s", modestr, s.st_size, namelen, namelen, path);
+ printf("%s %*llu %*.*s", modestr, SIZELEN, s.st_size, namelen,
+ namelen, path);
if (S_ISLNK(s.st_mode)) {
char realname[PATH_MAX];