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-devel

[Xen-devel] [PATCH 06/17] xenpaging: do not use DPRINTF/ERROR if xch han

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 06/17] xenpaging: do not use DPRINTF/ERROR if xch handle is unavailable
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 06 Dec 2010 21:59:13 +0100
Delivery-date: Mon, 06 Dec 2010 13:12:05 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1291669159; l=1157; s=domk; d=aepfle.de; h=References:Subject:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=jvaTD3LGJoumPQMbbcIX+EBohoo=; b=HwDTHQYm8+rFejlDa8QtgK3O/4+O67OC1WpHLNPlX2Xnc8agS1bEI5MbAOEnNlXwtz4 9PThMp//nerItMwGgd81vnymKgBuQh6RjszI2gtiEzoBykNR28lkkGo2UWLGpGh88bJvI ueBZ634yNGXE57Lr4zreCKdpwovswGEPphw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20101206205907.848643876@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.48-4.4
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>

---
 tools/xenpaging/xenpaging.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- xen-unstable.hg-4.1.22459.orig/tools/xenpaging/xenpaging.c
+++ xen-unstable.hg-4.1.22459/tools/xenpaging/xenpaging.c
@@ -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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>