From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLBKc-0001jl-6c for qemu-devel@nongnu.org; Mon, 18 Jan 2016 10:03:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLBKW-0006sk-KX for qemu-devel@nongnu.org; Mon, 18 Jan 2016 10:02:58 -0500 Received: from e06smtp05.uk.ibm.com ([195.75.94.101]:38444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLBKW-0006sY-Ad for qemu-devel@nongnu.org; Mon, 18 Jan 2016 10:02:52 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Jan 2016 15:02:51 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id BB65717D8042 for ; Mon, 18 Jan 2016 15:02:52 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0IF2mMt29687908 for ; Mon, 18 Jan 2016 15:02:48 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0IE2nTG000345 for ; Mon, 18 Jan 2016 07:02:49 -0700 From: Greg Kurz Date: Mon, 18 Jan 2016 16:02:46 +0100 Message-ID: <20160118150246.30699.74556.stgit@bahia.huguette.org> In-Reply-To: <20160118150234.30699.57180.stgit@bahia.huguette.org> References: <20160118150234.30699.57180.stgit@bahia.huguette.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/2] fsdev: use error_report() instead of fprintf(stderr) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Greg Kurz , qemu-devel@nongnu.org, "Aneesh Kumar K.V" Only fix the code that gets built into QEMU. Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ccfec139ab2b..55e2f7a0fb58 100644 --- a/fsdev/qemu-fsdev.c +++ b/fsdev/qemu-fsdev.c @@ -17,6 +17,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/config-file.h" +#include "qemu/error-report.h" static QTAILQ_HEAD(FsDriverEntry_head, FsDriverListEntry) 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); if (!fsdev_id) { - fprintf(stderr, "fsdev: No id specified\n"); + error_report("fsdev: No id specified"); return -1; } @@ -52,11 +53,11 @@ int qemu_fsdev_add(QemuOpts *opts) } if (i == ARRAY_SIZE(FsDrivers)) { - fprintf(stderr, "fsdev: fsdriver %s not found\n", fsdriver); + error_report("fsdev: fsdriver %s not found", fsdriver); return -1; } } else { - fprintf(stderr, "fsdev: No fsdriver specified\n"); + error_report("fsdev: No fsdriver specified"); return -1; }