diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-02-01 23:53:35 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-02-01 23:53:35 -0500 |
commit | 86821914a22adb69bc81b38fde4ba5258c1cecba (patch) | |
tree | 01d93c9ccc8346e86c71dab3907255e199793f17 | |
parent | 0bf9ef787cd9cd482280f935b1a13e068e5a5d82 (diff) |
trace-cmd: Fix the compare to none in the filter file
The compare to the filter contents should only check the first for
characters to show that an empty filter is none, otherwise the
whitespace may screw it up.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-cmd.c b/trace-cmd.c index 4466f93..05c0746 100644 --- a/trace-cmd.c +++ b/trace-cmd.c | |||
@@ -748,7 +748,7 @@ static void update_filter(const char *event_name, const char *field, | |||
748 | close(fd); | 748 | close(fd); |
749 | 749 | ||
750 | /* append unless there is currently no filter */ | 750 | /* append unless there is currently no filter */ |
751 | if (strcmp(buf, "none") == 0) { | 751 | if (strncmp(buf, "none", 4) == 0) { |
752 | filter = malloc_or_die(strlen(pid) + strlen(field) + | 752 | filter = malloc_or_die(strlen(pid) + strlen(field) + |
753 | strlen("(==)") + 1); | 753 | strlen("(==)") + 1); |
754 | sprintf(filter, "(%s==%s)", field, pid); | 754 | sprintf(filter, "(%s==%s)", field, pid); |