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

Re: [Xen-devel] [PATCH] tools/xentop: Display '-' when stats are not available.



On Fri, Feb 22, 2019 at 10:47:24AM +0000, Ronan Abhamon wrote:
> Le 21/02/2019 à 16:32, Wei Liu a écrit :
> 
> > On Wed, Feb 20, 2019 at 04:19:25PM +0000, Ronan Abhamon wrote:
> > > From: Pritha Srivastava <pritha.srivastava@xxxxxxxxxx>
> > > 
> > > Displaying 0 is misleading.
> > > 
> > > Signed-off-by: Pritha Srivastava <pritha.srivastava@xxxxxxxxxx>
> > > Signed-off-by: Ronan Abhamon <ronan.abhamon@xxxxxxxx>
> > > ---
> > >   tools/xenstat/libxenstat/src/xenstat.c       |   6 +
> > >   tools/xenstat/libxenstat/src/xenstat.h       |   3 +
> > >   tools/xenstat/libxenstat/src/xenstat_linux.c |  47 +++---
> > >   tools/xenstat/libxenstat/src/xenstat_priv.h  |   1 +
> > >   tools/xenstat/xentop/xentop.c                | 159 +++++++++++++++----
> > >   5 files changed, 158 insertions(+), 58 deletions(-)
> > > 
> > > diff --git a/tools/xenstat/libxenstat/src/xenstat.c 
> > > b/tools/xenstat/libxenstat/src/xenstat.c
> > > index fbe44f3c56..8fa12d7bc0 100644
> > > --- a/tools/xenstat/libxenstat/src/xenstat.c
> > > +++ b/tools/xenstat/libxenstat/src/xenstat.c
> > > @@ -729,6 +729,12 @@ unsigned long long xenstat_vbd_wr_sects(xenstat_vbd 
> > > * vbd)
> > >           return vbd->wr_sects;
> > >   }
> > > +/* Returns error while getting stats (1 if error happened, 0 otherwise) 
> > > */
> > > +unsigned int xenstat_vbd_error(xenstat_vbd * vbd)
> > > +{
> > > + return vbd->error;
> > > +}
> > > +
> > You can do away with this function by accessing vbd->error directly in
> > code.
> 
> Thank you for your feedback, but xenstat_vbd is a private struct of
> libxenstat.
> 
> Correct me if I am wrong but I can't include this file in the xentop folder.

Oh, sorry. I misread.

Yes then you need to keep this function. But I would like you to change
the return type to bool if possible.

Wei.

> 
> 
> Ronan Abhamon
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.