From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b80V7-0002Q3-Nz for qemu-devel@nongnu.org; Wed, 01 Jun 2016 03:23:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b80V6-0001xc-NP for qemu-devel@nongnu.org; Wed, 01 Jun 2016 03:23:37 -0400 Date: Wed, 1 Jun 2016 15:23:26 +0800 From: Fam Zheng Message-ID: <20160601072326.GF8639@ad.usersys.redhat.com> References: <1464764901-8773-1-git-send-email-weijg.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464764901-8773-1-git-send-email-weijg.fnst@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH] block/raw-posix: Fix error_report of mounting message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wei Jiangang Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com On Wed, 06/01 15:08, Wei Jiangang wrote: > Use a single error_printf to replace triple error_report. > > Signed-off-by: Wei Jiangang > --- > block/raw-posix.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/block/raw-posix.c b/block/raw-posix.c > index a4f5a1b..141b01a 100644 > --- a/block/raw-posix.c > +++ b/block/raw-posix.c > @@ -2061,11 +2061,11 @@ static bool setup_cdrom(char *bsd_path, Error **errp) > /* Prints directions on mounting and unmounting a device */ > static void print_unmounting_directions(const char *file_name) > { > - error_report("If device %s is mounted on the desktop, unmount" > - " it first before using it in QEMU", file_name); > - error_report("Command to unmount device: diskutil unmountDisk %s", > - file_name); > - error_report("Command to mount device: diskutil mountDisk %s", file_name); > + error_printf("If device %s is mounted on the desktop, unmount" > + " it first before using it in QEMU\n" > + "Command to unmount device: diskutil unmountDisk %s\n" > + "Command to mount device: diskutil mountDisk %s\n", > + file_name, file_name, file_name); I'd say it's less readable with a worse alignment to the parameters. Fam