summaryrefslogtreecommitdiff
path: root/runit/svlogd.c
diff options
context:
space:
mode:
authorDenys Vlasenko2018-11-01 14:53:04 +0100
committerDenys Vlasenko2018-11-01 14:53:04 +0100
commit0df289f427da6279e3ca198d14e90015c079af44 (patch)
tree9d0f78dd677c7dd65399fa1e848ad3228714f330 /runit/svlogd.c
parent0575c9932d203d93633104e12054dcf5da522061 (diff)
downloadbusybox-0df289f427da6279e3ca198d14e90015c079af44.zip
busybox-0df289f427da6279e3ca198d14e90015c079af44.tar.gz
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/svlogd.c')
-rw-r--r--runit/svlogd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 13de257..b0690d7 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -1010,7 +1010,7 @@ static void sig_hangup_handler(int sig_no UNUSED_PARAM)
reopenasap = 1;
}
-static void logmatch(struct logdir *ld)
+static void logmatch(struct logdir *ld, char* lineptr, int lineptr_len)
{
char *s;
@@ -1021,12 +1021,12 @@ static void logmatch(struct logdir *ld)
switch (s[0]) {
case '+':
case '-':
- if (pmatch(s+1, line, linelen))
+ if (pmatch(s+1, lineptr, lineptr_len))
ld->match = s[0];
break;
case 'e':
case 'E':
- if (pmatch(s+1, line, linelen))
+ if (pmatch(s+1, lineptr, lineptr_len))
ld->matcherr = s[0];
break;
}
@@ -1182,7 +1182,7 @@ int svlogd_main(int argc, char **argv)
if (ld->fddir == -1)
continue;
if (ld->inst)
- logmatch(ld);
+ logmatch(ld, lineptr, linelen);
if (ld->matcherr == 'e') {
/* runit-1.8.0 compat: if timestamping, do it on stderr too */
////full_write(STDERR_FILENO, printptr, printlen);