WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xenpaging: do not use DPRINTF/ERROR if xc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenpaging: do not use DPRINTF/ERROR if xch handle is unavailable
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:34:14 -0800
Delivery-date: Thu, 23 Dec 2010 05:49:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1292352649 0
# Node ID 688ec201e7c719c95c6f95787e0655ac68c73a9d
# Parent  13f0549597cb7a9ab56a587e09e756245678ce0a
xenpaging: do not use DPRINTF/ERROR if xch handle is unavailable

Fix DPRINTF/ERROR usage. Both macros reference a xch variable in local scope.
If xc_interface_open fails and after xc_interface_close, both can not be used
anymore. Use standard fprintf for this case.

Remove the code to print the exit value, its not really useful.
Its a left-over for debugging from an earlier patch.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/xenpaging/xenpaging.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -r 13f0549597cb -r 688ec201e7c7 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Tue Dec 14 18:50:16 2010 +0000
+++ b/tools/xenpaging/xenpaging.c       Tue Dec 14 18:50:49 2010 +0000
@@ -539,7 +539,7 @@ int main(int argc, char *argv[])
     paging = xenpaging_init(&xch, domain_id);
     if ( paging == NULL )
     {
-        ERROR("Error initialising paging");
+        fprintf(stderr, "Error initialising paging");
         return 1;
     }
 
@@ -688,12 +688,10 @@ int main(int argc, char *argv[])
     /* Tear down domain paging */
     rc1 = xenpaging_teardown(xch, paging);
     if ( rc1 != 0 )
-        ERROR("Error tearing down paging");
+        fprintf(stderr, "Error tearing down paging");
 
     if ( rc == 0 )
         rc = rc1;
-
-    DPRINTF("xenpaging exit code %d\n", rc);
     return rc;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenpaging: do not use DPRINTF/ERROR if xch handle is unavailable, Xen patchbot-unstable <=