qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block/raw-posix: Fix error_report of mounting m


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH] block/raw-posix: Fix error_report of mounting message
Date: Thu, 2 Jun 2016 11:15:59 +0800
User-agent: Mutt/1.6.1 (2016-04-27)

On Thu, 06/02 03:04, Wei, Jiangang wrote:
> On Wed, 2016-06-01 at 15:23 +0800, Fam Zheng wrote:
> > On Wed, 06/01 15:08, Wei Jiangang wrote:
> > > Use a single error_printf to replace triple error_report.
> > > 
> > > Signed-off-by: Wei Jiangang <address@hidden>
> > > ---
> > >  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.
> Hi, Fam
> 
> Thanks for your comment.
> You mean every error_report() followed by file_name is more readable ?
> or my codes dosen't follow a good alignment format´╝č
> 

I'm happy with either way. :)

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]