aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-22 15:53:34 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-22 15:53:34 +0000
commit7ab5e3dfcd74c97d39c4a0effc5a1027c8a0aa7f (patch)
treed3ddfe31379fcee7c0d8fe972c2bb257d8a34ecd /runit
parent78ee7c853a8c140544c549215e979c06bfb8c8f0 (diff)
downloadbusybox-w32-7ab5e3dfcd74c97d39c4a0effc5a1027c8a0aa7f.tar.gz
busybox-w32-7ab5e3dfcd74c97d39c4a0effc5a1027c8a0aa7f.tar.bz2
busybox-w32-7ab5e3dfcd74c97d39c4a0effc5a1027c8a0aa7f.zip
svlogd: fix compat problem: svlogd -tt should timestanp stderr too
Diffstat (limited to 'runit')
-rw-r--r--runit/svlogd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 5f682b19c..2dc8cb987 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -985,9 +985,11 @@ int svlogd_main(int argc, char **argv)
985 if (ld->fddir == -1) continue; 985 if (ld->fddir == -1) continue;
986 if (ld->inst) 986 if (ld->inst)
987 logmatch(ld); 987 logmatch(ld);
988 if (ld->matcherr == 'e') 988 if (ld->matcherr == 'e') {
989 /* runit-1.8.0 compat: if timestamping, do it on stderr too */
989 ////full_write(2, printptr, printlen); 990 ////full_write(2, printptr, printlen);
990 fwrite(lineptr, 1, linelen, stderr); 991 fwrite(printptr, 1, printlen, stderr);
992 }
991 if (ld->match != '+') continue; 993 if (ld->match != '+') continue;
992 buffer_pwrite(i, printptr, printlen); 994 buffer_pwrite(i, printptr, printlen);
993 } 995 }
@@ -1012,9 +1014,10 @@ int svlogd_main(int argc, char **argv)
1012 /* linelen == no of chars incl. '\n' (or == stdin_cnt) */ 1014 /* linelen == no of chars incl. '\n' (or == stdin_cnt) */
1013 for (i = 0; i < dirn; ++i) { 1015 for (i = 0; i < dirn; ++i) {
1014 if (dir[i].fddir == -1) continue; 1016 if (dir[i].fddir == -1) continue;
1015 if (dir[i].matcherr == 'e') 1017 if (dir[i].matcherr == 'e') {
1016 ////full_write(2, lineptr, linelen); 1018 ////full_write(2, lineptr, linelen);
1017 fwrite(lineptr, 1, linelen, stderr); 1019 fwrite(lineptr, 1, linelen, stderr);
1020 }
1018 if (dir[i].match != '+') continue; 1021 if (dir[i].match != '+') continue;
1019 buffer_pwrite(i, lineptr, linelen); 1022 buffer_pwrite(i, lineptr, linelen);
1020 } 1023 }