From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrGhJ-0006XX-Gi for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrGhD-0006Qm-8j for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:16 -0400 Received: from [199.232.76.173] (port=56053 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrGhA-0006QA-QC for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53850) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrGhA-0004em-3o for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:43:08 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8PJh7Gx000302 for ; Fri, 25 Sep 2009 15:43:07 -0400 From: Gerd Hoffmann Date: Fri, 25 Sep 2009 21:42:40 +0200 Message-Id: <1253907769-1067-16-git-send-email-kraxel@redhat.com> In-Reply-To: <1253907769-1067-1-git-send-email-kraxel@redhat.com> References: <1253907769-1067-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 15/24] switch qemu-config to qemu_error List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- qemu-config.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 39bf6a9..89b2b7c 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -1,6 +1,7 @@ #include "qemu-common.h" #include "qemu-option.h" #include "qemu-config.h" +#include "sysemu.h" QemuOptsList qemu_drive_opts = { .name = "drive", @@ -166,7 +167,7 @@ int qemu_set_option(const char *str) rc = sscanf(str, "%63[^.].%63[^.].%63[^=]%n", group, id, arg, &offset); if (rc < 3 || str[offset] != '=') { - fprintf(stderr, "can't parse: \"%s\"\n", str); + qemu_error("can't parse: \"%s\"\n", str); return -1; } @@ -175,19 +176,19 @@ int qemu_set_option(const char *str) break; } if (lists[i] == NULL) { - fprintf(stderr, "there is no option group \"%s\"\n", group); + qemu_error("there is no option group \"%s\"\n", group); return -1; } opts = qemu_opts_find(lists[i], id); if (!opts) { - fprintf(stderr, "there is no %s \"%s\" defined\n", + qemu_error("there is no %s \"%s\" defined\n", lists[i]->name, id); return -1; } if (-1 == qemu_opt_set(opts, arg, str+offset+1)) { - fprintf(stderr, "failed to set \"%s\" for %s \"%s\"\n", + qemu_error("failed to set \"%s\" for %s \"%s\"\n", arg, lists[i]->name, id); return -1; } -- 1.6.2.5