aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-11-01 14:53:04 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-11-01 14:53:04 +0100
commit0df289f427da6279e3ca198d14e90015c079af44 (patch)
tree9d0f78dd677c7dd65399fa1e848ad3228714f330 /runit
parent0575c9932d203d93633104e12054dcf5da522061 (diff)
downloadbusybox-w32-0df289f427da6279e3ca198d14e90015c079af44.tar.gz
busybox-w32-0df289f427da6279e3ca198d14e90015c079af44.tar.bz2
busybox-w32-0df289f427da6279e3ca198d14e90015c079af44.zip
svlogd: fix pattern matching when using timestamps
function old new delta svlogd_main 1488 1496 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'runit')
-rw-r--r--runit/svlogd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 13de2570f..b0690d794 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -1010,7 +1010,7 @@ static void sig_hangup_handler(int sig_no UNUSED_PARAM)
1010 reopenasap = 1; 1010 reopenasap = 1;
1011} 1011}
1012 1012
1013static void logmatch(struct logdir *ld) 1013static void logmatch(struct logdir *ld, char* lineptr, int lineptr_len)
1014{ 1014{
1015 char *s; 1015 char *s;
1016 1016
@@ -1021,12 +1021,12 @@ static void logmatch(struct logdir *ld)
1021 switch (s[0]) { 1021 switch (s[0]) {
1022 case '+': 1022 case '+':
1023 case '-': 1023 case '-':
1024 if (pmatch(s+1, line, linelen)) 1024 if (pmatch(s+1, lineptr, lineptr_len))
1025 ld->match = s[0]; 1025 ld->match = s[0];
1026 break; 1026 break;
1027 case 'e': 1027 case 'e':
1028 case 'E': 1028 case 'E':
1029 if (pmatch(s+1, line, linelen)) 1029 if (pmatch(s+1, lineptr, lineptr_len))
1030 ld->matcherr = s[0]; 1030 ld->matcherr = s[0];
1031 break; 1031 break;
1032 } 1032 }
@@ -1182,7 +1182,7 @@ int svlogd_main(int argc, char **argv)
1182 if (ld->fddir == -1) 1182 if (ld->fddir == -1)
1183 continue; 1183 continue;
1184 if (ld->inst) 1184 if (ld->inst)
1185 logmatch(ld); 1185 logmatch(ld, lineptr, linelen);
1186 if (ld->matcherr == 'e') { 1186 if (ld->matcherr == 'e') {
1187 /* runit-1.8.0 compat: if timestamping, do it on stderr too */ 1187 /* runit-1.8.0 compat: if timestamping, do it on stderr too */
1188 ////full_write(STDERR_FILENO, printptr, printlen); 1188 ////full_write(STDERR_FILENO, printptr, printlen);