Re: [PATCH] Fix the stdout in print_job_progress()

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

 




----- Original Message -----
> From: "Eric Blake" <eblake@xxxxxxxxxx>
> To: "Yanbing Du" <ydu@xxxxxxxxxx>
> Cc: libvir-list@xxxxxxxxxx
> Sent: Friday, March 29, 2013 7:14:41 PM
> Subject: Re:  [PATCH] Fix the stdout in print_job_progress()
> 
> On 03/29/2013 04:33 AM, Yanbing Du wrote:
> > Signed-off-by: Yanbing Du <ydu@xxxxxxxxxx>
> > ---
> >  tools/virsh-domain.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> > index d1e6f9d..10b646f 100644
> > --- a/tools/virsh-domain.c
> > +++ b/tools/virsh-domain.c
> > @@ -1407,7 +1407,7 @@ print_job_progress(const char *label,
> > unsigned long long remaining,
> >  
> >      /* see comments in vshError about why we must flush */
> >      fflush(stdout);
> > -    fprintf(stderr, "\r%s: [%3d %%]", label, progress);
> > +    fprintf(stdout, "\r%s: [%3d %%]", label, progress);
> 
> NACK.  Progress is intentionally reported to stderr (hence flushing
> stdout before printing progress, and flushing stderr after).
> 

OK, i see. 
Thanks for your reply.

> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]