[BusyBox] patch: allow ls coloring to be disabled
Vladimir N. Oleynik
dzo at simtreas.ru
Wed Nov 10 09:20:19 UTC 2004
Paul,
> --- busybox-1.00.orig/coreutils/ls.c 2004-09-23 22:04:13.000000000 -0400
> +++ busybox-1.00/coreutils/ls.c 2004-11-09 12:09:37.000000000 -0500
> @@ -984,8 +984,20 @@
> #endif
>
> #ifdef CONFIG_FEATURE_LS_COLOR
> - if (isatty(STDOUT_FILENO))
> - show_color = 1;
> + {
> + char *lscolor;
> + lscolor = getenv("BB_LSCOLOR");
> + if (!lscolor)
> + show_color = 1; /* backwards compatible default */
Hmm. If BB_LSCOLOR undeclared you switch on show color without check isatty.
Its not backwards compatible.
--w
vodz
More information about the busybox
mailing list