[patch] busybox-1.14.1 ftpd: make -vv -S more useful

Denys Vlasenko vda.linux at googlemail.com
Thu Jun 4 16:52:00 UTC 2009


On Sun, May 31, 2009 at 3:19 PM, Stefan Seyfried <seife at suse.de> wrote:
> It's actually a bad idea to log verbose output to stdout,
> so if syslog is enabled, only use syslog.

We log it to stderr. Why is it a bad idea?

> This made debugging much easier for me ;)
>
> diff -rup busybox-1.14.1/networking/ftpd.c busybox-1.14.1-fixed/networking//ftpd.c
> --- busybox-1.14.1/networking/ftpd.c    2009-05-27 18:00:23.000000000 +0200
> +++ busybox-1.14.1-fixed/networking//ftpd.c     2009-05-31 14:37:58.465454909 +0200
> @@ -1142,7 +1142,7 @@ int ftpd_main(int argc UNUSED_PARAM, cha
>        if (opts & OPT_S) {
>                /* LOG_NDELAY is needed since we may chroot later */
>                openlog(applet_name, LOG_PID | LOG_NDELAY, LOG_DAEMON);
> -               logmode |= LOGMODE_SYSLOG;
> +               logmode = LOGMODE_SYSLOG;
>        }
>        if (logmode)
>                applet_name = xasprintf("%s[%u]", applet_name, (int)getpid());

--
vda


More information about the busybox mailing list