xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xenproject.org, konrad@kernel.org,
	ross.lagerwall@citrix.com
Cc: ian.jackson@eu.citrix.com, wei.liu2@citrix.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH v1 2/3] xen-livepatch: Print the header _after_ the first livepatch hypercall
Date: Wed, 21 Sep 2016 15:20:29 -0400	[thread overview]
Message-ID: <1474485630-24113-3-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1474485630-24113-1-git-send-email-konrad.wilk@oracle.com>

That way we can print out the header if we are sure the
hypervisor has been compiled with Xen Livepatching.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 tools/misc/xen-livepatch.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/misc/xen-livepatch.c b/tools/misc/xen-livepatch.c
index 7512a98..2de04c0 100644
--- a/tools/misc/xen-livepatch.c
+++ b/tools/misc/xen-livepatch.c
@@ -91,8 +91,6 @@ static int list_func(int argc, char *argv[])
         return rc;
     }
 
-    fprintf(stdout," ID                                     | status\n"
-                   "----------------------------------------+------------\n");
     do {
         done = 0;
         /* The memset is done to catch errors. */
@@ -106,6 +104,10 @@ static int list_func(int argc, char *argv[])
                     idx, left, errno, strerror(errno));
             break;
         }
+        if ( !idx )
+            fprintf(stdout," ID                                     | status\n"
+                           "----------------------------------------+------------\n");
+
         for ( i = 0; i < done; i++ )
         {
             unsigned int j;
-- 
2.4.11


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-09-21 19:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 19:20 [PATCH v1] xen-livepatch fixes for Xen 4.8 Konrad Rzeszutek Wilk
2016-09-21 19:20 ` [PATCH v1 1/3] xen-livepatch: Remove the 'test' part Konrad Rzeszutek Wilk
2016-09-22  7:20   ` Ross Lagerwall
2016-09-21 19:20 ` Konrad Rzeszutek Wilk [this message]
2016-09-22  7:21   ` [PATCH v1 2/3] xen-livepatch: Print the header _after_ the first livepatch hypercall Ross Lagerwall
2016-09-21 19:20 ` [PATCH v1 3/3] xen-livepatch: If hypervisor is not compiled with Livepatching Konrad Rzeszutek Wilk
2016-09-22  7:25   ` Ross Lagerwall
2016-09-22 10:12     ` Konrad Rzeszutek Wilk
2016-09-22 10:34       ` Ian Jackson
2016-09-22 10:36         ` Ian Jackson
2016-09-22 10:41           ` Konrad Rzeszutek Wilk
2016-09-22 10:37       ` Ross Lagerwall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474485630-24113-3-git-send-email-konrad.wilk@oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=konrad@kernel.org \
    --cc=ross.lagerwall@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).