projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78ee7c8
)
svlogd: fix compat problem: svlogd -tt should timestanp stderr too
author
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 22 Oct 2007 15:53:34 +0000
(15:53 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 22 Oct 2007 15:53:34 +0000
(15:53 -0000)
runit/svlogd.c
patch
|
blob
|
history
diff --git
a/runit/svlogd.c
b/runit/svlogd.c
index
5f682b1
..
2dc8cb9
100644
(file)
--- a/
runit/svlogd.c
+++ b/
runit/svlogd.c
@@
-985,9
+985,11
@@
int svlogd_main(int argc, char **argv)
if (ld->fddir == -1) continue;
if (ld->inst)
logmatch(ld);
if (ld->fddir == -1) continue;
if (ld->inst)
logmatch(ld);
- if (ld->matcherr == 'e')
+ if (ld->matcherr == 'e') {
+ /* runit-1.8.0 compat: if timestamping, do it on stderr too */
////full_write(2, printptr, printlen);
////full_write(2, printptr, printlen);
- fwrite(lineptr, 1, linelen, stderr);
+ fwrite(printptr, 1, printlen, stderr);
+ }
if (ld->match != '+') continue;
buffer_pwrite(i, printptr, printlen);
}
if (ld->match != '+') continue;
buffer_pwrite(i, printptr, printlen);
}
@@
-1012,9
+1014,10
@@
int svlogd_main(int argc, char **argv)
/* linelen == no of chars incl. '\n' (or == stdin_cnt) */
for (i = 0; i < dirn; ++i) {
if (dir[i].fddir == -1) continue;
/* linelen == no of chars incl. '\n' (or == stdin_cnt) */
for (i = 0; i < dirn; ++i) {
if (dir[i].fddir == -1) continue;
- if (dir[i].matcherr == 'e')
+ if (dir[i].matcherr == 'e')
{
////full_write(2, lineptr, linelen);
fwrite(lineptr, 1, linelen, stderr);
////full_write(2, lineptr, linelen);
fwrite(lineptr, 1, linelen, stderr);
+ }
if (dir[i].match != '+') continue;
buffer_pwrite(i, lineptr, linelen);
}
if (dir[i].match != '+') continue;
buffer_pwrite(i, lineptr, linelen);
}