[git commit] busybox: stop depending on FEATURE_AUTOWIDTH for applet list

Denys Vlasenko vda.linux at googlemail.com
Wed Jan 11 09:52:24 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=a8a075acfee7b31c4da00cf3500b67354339e3b9
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Many other appletw don't - they unconditionally use get_terminal_wodth(),
and here the amount of code saved by FEATURE_AUTOWIDTH=n is tiny.

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/appletlib.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index bf6d476..7f0d620 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -748,11 +748,7 @@ static int busybox_main(char **argv)
 		int col;
 		unsigned output_width;
  help:
-		output_width = 80;
-		if (ENABLE_FEATURE_AUTOWIDTH) {
-			/* Obtain the terminal width */
-			output_width = get_terminal_width(2);
-		}
+		output_width = get_terminal_width(2);
 
 		dup2(1, 2);
 		full_write2_str(bb_banner); /* reuse const string */


More information about the busybox-cvs mailing list