Patchwork [08/11] error: Convert qemu_opts_validate() to QError

login
register
mail settings
Submitter Markus Armbruster
Date March 18, 2010, 4:33 p.m.
Message ID <1268929996-28763-9-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/48071/
State New
Headers show

Comments

Markus Armbruster - March 18, 2010, 4:33 p.m.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu-option.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Patch

diff --git a/qemu-option.c b/qemu-option.c
index 5c39666..8b45068 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -874,8 +874,7 @@  int qemu_opts_validate(QemuOpts *opts, const QemuOptDesc *desc)
             }
         }
         if (desc[i].name == NULL) {
-            fprintf(stderr, "option \"%s\" is not valid for %s\n",
-                    opt->name, opts->list->name);
+            qerror_report(QERR_INVALID_PARAMETER, opt->name);
             return -1;
         }