diff mbox series

linux-user/main: support dfilter

Message ID 20171017103514.5859-1-alex.bennee@linaro.org
State Superseded
Headers show
Series linux-user/main: support dfilter | expand

Commit Message

Alex Bennée Oct. 17, 2017, 10:35 a.m. UTC
This adds the -dfilter support to linux-user. There is a minor
checkpatch complaint about formatting which I've ignored for aesthetic
reasons.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


---
v2
  - add r-b tags
  - expand comment to mention checkpatch failure
---
 linux-user/main.c | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.14.1

Comments

no-reply@patchew.org Oct. 17, 2017, 11:11 a.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20171017103514.5859-1-alex.bennee@linaro.org
Subject: [Qemu-devel] [PATCH] linux-user/main: support dfilter

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
a92f738c67 linux-user/main: support dfilter

=== OUTPUT BEGIN ===
Checking PATCH 1/1: linux-user/main: support dfilter...
ERROR: space required after that ',' (ctx:VxV)
#40: FILE: linux-user/main.c:4063:
+     "range[,...]","filter logging based on address range"},
                   ^

total: 1 errors, 0 warnings, 19 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Riku Voipio Oct. 17, 2017, 7:18 p.m. UTC | #2
On Tue, Oct 17, 2017 at 11:35:14AM +0100, Alex Bennée wrote:
> This adds the -dfilter support to linux-user. There is a minor

> checkpatch complaint about formatting which I've ignored for aesthetic

> reasons.


Applied to linux-user, thanks
 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> Reviewed-by: Laurent Vivier <laurent@vivier.eu>

> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

> 

> ---

> v2

>   - add r-b tags

>   - expand comment to mention checkpatch failure

> ---

>  linux-user/main.c | 7 +++++++

>  1 file changed, 7 insertions(+)

> 

> diff --git a/linux-user/main.c b/linux-user/main.c

> index 829f974662..5072aa855b 100644

> --- a/linux-user/main.c

> +++ b/linux-user/main.c

> @@ -3854,6 +3854,11 @@ static void handle_arg_log(const char *arg)

>      qemu_set_log(mask);

>  }

>  

> +static void handle_arg_dfilter(const char *arg)

> +{

> +    qemu_set_dfilter_ranges(arg, NULL);

> +}

> +

>  static void handle_arg_log_filename(const char *arg)

>  {

>      qemu_set_log_filename(arg, &error_fatal);

> @@ -4054,6 +4059,8 @@ static const struct qemu_argument arg_table[] = {

>      {"d",          "QEMU_LOG",         true,  handle_arg_log,

>       "item[,...]", "enable logging of specified items "

>       "(use '-d help' for a list of items)"},

> +    {"dfilter",    "QEMU_DFILTER",     true,  handle_arg_dfilter,

> +     "range[,...]","filter logging based on address range"},

>      {"D",          "QEMU_LOG_FILENAME", true, handle_arg_log_filename,

>       "logfile",     "write logs to 'logfile' (default stderr)"},

>      {"p",          "QEMU_PAGESIZE",    true,  handle_arg_pagesize,

> -- 

> 2.14.1

>
diff mbox series

Patch

diff --git a/linux-user/main.c b/linux-user/main.c
index 829f974662..5072aa855b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3854,6 +3854,11 @@  static void handle_arg_log(const char *arg)
     qemu_set_log(mask);
 }
 
+static void handle_arg_dfilter(const char *arg)
+{
+    qemu_set_dfilter_ranges(arg, NULL);
+}
+
 static void handle_arg_log_filename(const char *arg)
 {
     qemu_set_log_filename(arg, &error_fatal);
@@ -4054,6 +4059,8 @@  static const struct qemu_argument arg_table[] = {
     {"d",          "QEMU_LOG",         true,  handle_arg_log,
      "item[,...]", "enable logging of specified items "
      "(use '-d help' for a list of items)"},
+    {"dfilter",    "QEMU_DFILTER",     true,  handle_arg_dfilter,
+     "range[,...]","filter logging based on address range"},
     {"D",          "QEMU_LOG_FILENAME", true, handle_arg_log_filename,
      "logfile",     "write logs to 'logfile' (default stderr)"},
     {"p",          "QEMU_PAGESIZE",    true,  handle_arg_pagesize,