Patchwork [for-1.4,v2,5/6] vl: Drop redundant "parse error" reports

login
register
mail settings
Submitter Markus Armbruster
Date Feb. 8, 2013, 4:17 p.m.
Message ID <1360340232-4670-6-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/219214/
State New
Headers show

Comments

Markus Armbruster - Feb. 8, 2013, 4:17 p.m.
qemu_opts_parse() reports the error already, and in a much more useful
way.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 vl.c | 4 ----
 1 file changed, 4 deletions(-)
Luiz Capitulino - Feb. 8, 2013, 5:54 p.m.
On Fri,  8 Feb 2013 17:17:11 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> qemu_opts_parse() reports the error already, and in a much more useful
> way.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>

> ---
>  vl.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/vl.c b/vl.c
> index a8dc73d..73122d8 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3334,7 +3334,6 @@ int main(int argc, char **argv, char **envp)
>                  }
>                  opts = qemu_opts_parse(olist, optarg, 1);
>                  if (!opts) {
> -                    fprintf(stderr, "parse error: %s\n", optarg);
>                      exit(1);
>                  }
>                  break;
> @@ -3350,7 +3349,6 @@ int main(int argc, char **argv, char **envp)
>                  }
>                  opts = qemu_opts_parse(olist, optarg, 1);
>                  if (!opts) {
> -                    fprintf(stderr, "parse error: %s\n", optarg);
>                      exit(1);
>                  }
>  
> @@ -3521,7 +3519,6 @@ int main(int argc, char **argv, char **envp)
>                  olist = qemu_find_opts("machine");
>                  opts = qemu_opts_parse(olist, optarg, 1);
>                  if (!opts) {
> -                    fprintf(stderr, "parse error: %s\n", optarg);
>                      exit(1);
>                  }
>                  optarg = qemu_opt_get(opts, "type");
> @@ -3755,7 +3752,6 @@ int main(int argc, char **argv, char **envp)
>                  }
>                  opts = qemu_opts_parse(olist, optarg, 0);
>                  if (!opts) {
> -                    fprintf(stderr, "parse error: %s\n", optarg);
>                      exit(1);
>                  }
>                  break;

Patch

diff --git a/vl.c b/vl.c
index a8dc73d..73122d8 100644
--- a/vl.c
+++ b/vl.c
@@ -3334,7 +3334,6 @@  int main(int argc, char **argv, char **envp)
                 }
                 opts = qemu_opts_parse(olist, optarg, 1);
                 if (!opts) {
-                    fprintf(stderr, "parse error: %s\n", optarg);
                     exit(1);
                 }
                 break;
@@ -3350,7 +3349,6 @@  int main(int argc, char **argv, char **envp)
                 }
                 opts = qemu_opts_parse(olist, optarg, 1);
                 if (!opts) {
-                    fprintf(stderr, "parse error: %s\n", optarg);
                     exit(1);
                 }
 
@@ -3521,7 +3519,6 @@  int main(int argc, char **argv, char **envp)
                 olist = qemu_find_opts("machine");
                 opts = qemu_opts_parse(olist, optarg, 1);
                 if (!opts) {
-                    fprintf(stderr, "parse error: %s\n", optarg);
                     exit(1);
                 }
                 optarg = qemu_opt_get(opts, "type");
@@ -3755,7 +3752,6 @@  int main(int argc, char **argv, char **envp)
                 }
                 opts = qemu_opts_parse(olist, optarg, 0);
                 if (!opts) {
-                    fprintf(stderr, "parse error: %s\n", optarg);
                     exit(1);
                 }
                 break;