mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
fsdev: use error_report() instead of fprintf(stderr)
Only fix the code that gets built into QEMU. Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
This commit is contained in:
parent
63325b181f
commit
ea753f3219
1 changed files with 4 additions and 3 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "qemu/config-file.h"
|
#include "qemu/config-file.h"
|
||||||
|
#include "qemu/error-report.h"
|
||||||
|
|
||||||
static QTAILQ_HEAD(FsDriverEntry_head, FsDriverListEntry) fsdriver_entries =
|
static QTAILQ_HEAD(FsDriverEntry_head, FsDriverListEntry) fsdriver_entries =
|
||||||
QTAILQ_HEAD_INITIALIZER(fsdriver_entries);
|
QTAILQ_HEAD_INITIALIZER(fsdriver_entries);
|
||||||
|
@ -40,7 +41,7 @@ int qemu_fsdev_add(QemuOpts *opts)
|
||||||
bool ro = qemu_opt_get_bool(opts, "readonly", 0);
|
bool ro = qemu_opt_get_bool(opts, "readonly", 0);
|
||||||
|
|
||||||
if (!fsdev_id) {
|
if (!fsdev_id) {
|
||||||
fprintf(stderr, "fsdev: No id specified\n");
|
error_report("fsdev: No id specified");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,11 +53,11 @@ int qemu_fsdev_add(QemuOpts *opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == ARRAY_SIZE(FsDrivers)) {
|
if (i == ARRAY_SIZE(FsDrivers)) {
|
||||||
fprintf(stderr, "fsdev: fsdriver %s not found\n", fsdriver);
|
error_report("fsdev: fsdriver %s not found", fsdriver);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "fsdev: No fsdriver specified\n");
|
error_report("fsdev: No fsdriver specified");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue