aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-25 21:42:40 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:48 -0500
commita861c453e7b02646ba66eba3a21c4f7a080cbc0d (patch)
tree4ffd8fdb53739164baa3a5d98d272b3462616681
parenta8e662b5477a7e3659c7fc2d83db50c42b201c1d (diff)
downloadqemu-a861c453e7b02646ba66eba3a21c4f7a080cbc0d.zip
qemu-a861c453e7b02646ba66eba3a21c4f7a080cbc0d.tar.gz
qemu-a861c453e7b02646ba66eba3a21c4f7a080cbc0d.tar.bz2
switch qemu-config to qemu_error
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--qemu-config.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/qemu-config.c b/qemu-config.c
index 785b146..ca93dc7 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",
@@ -186,7 +187,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;
}
@@ -195,19 +196,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 (qemu_opt_set(opts, arg, str+offset+1) == -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;
}