No new test; the existing test was already failing.
---
 toys/posix/ls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
From e1b38296d521d56f4cc9a17dbbb73dfdafa532b6 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Fri, 7 Apr 2017 23:30:31 -0700
Subject: [PATCH] Fix "ls -m".

No new test; the existing test was already failing.
---
 toys/posix/ls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toys/posix/ls.c b/toys/posix/ls.c
index d2a2e46..d07cf27 100644
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -412,8 +412,8 @@ static void listfiles(int dirfd, struct dirtree *indir)
         xputc('\n');
         width = 0;
       } else {
-        printf("  ");
-        width += 2;
+        printf((flags & FLAG_m)?" ":"  ");
+        width += (flags & FLAG_m)?1:2;
       }
     }
     width += *len;
-- 
2.12.2.715.g7642488e1d-goog

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to