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.srivast...@citrix.com>
Displaying 0 is misleading.
Signed-off-by: Pritha Srivastava <pritha.srivast...@citrix.com>
Signed-off-by: Ronan Abhamon <ronan.abha...@vates.fr>
---
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.
Ronan Abhamon
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel