From 63325b181f49d06bc2201cfdd52ba92c05939f13 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Fri, 22 Jan 2016 15:12:17 +0100 Subject: 9pfs: use error_report() instead of fprintf(stderr) Reviewed-by: Markus Armbruster Signed-off-by: Greg Kurz --- hw/9pfs/9p-local.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'hw/9pfs/9p-local.c') diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index bf63eab729..bb6662623f 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -20,6 +20,7 @@ #include #include #include "qemu/xattr.h" +#include "qemu/error-report.h" #include #include #ifdef CONFIG_LINUX_MAGIC_H @@ -1209,9 +1210,9 @@ static int local_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse) const char *path = qemu_opt_get(opts, "path"); if (!sec_model) { - fprintf(stderr, "security model not specified, " - "local fs needs security model\nvalid options are:" - "\tsecurity_model=[passthrough|mapped|none]\n"); + error_report("Security model not specified, local fs needs security model"); + error_printf("valid options are:" + "\tsecurity_model=[passthrough|mapped-xattr|mapped-file|none]\n"); return -1; } @@ -1225,14 +1226,14 @@ static int local_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse) } else if (!strcmp(sec_model, "mapped-file")) { fse->export_flags |= V9FS_SM_MAPPED_FILE; } else { - fprintf(stderr, "Invalid security model %s specified, valid options are" - "\n\t [passthrough|mapped-xattr|mapped-file|none]\n", - sec_model); + error_report("Invalid security model %s specified", sec_model); + error_printf("valid options are:" + "\t[passthrough|mapped-xattr|mapped-file|none]\n"); return -1; } if (!path) { - fprintf(stderr, "fsdev: No path specified.\n"); + error_report("fsdev: No path specified"); return -1; } fse->path = g_strdup(path); -- cgit v1.2.3