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: remove local domain_id variabl

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenpaging: remove local domain_id variable
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 28 Jun 2011 07:44:26 +0100
Delivery-date: Mon, 27 Jun 2011 23:49:49 -0700
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 1307695640 -7200
# Node ID d957acb8bee6d5d998a4432b40a342fa8d6a7885
# Parent  49cb290ede16c24d777309958d8a6236bc2028d2
xenpaging: remove local domain_id variable

Remove the local domain_id variable, it is already fetched from
paging->mem_event in other places.
Update the sprintf format string to use unsigned argument.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r 49cb290ede16 -r d957acb8bee6 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:19 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:20 2011 +0200
@@ -552,7 +552,6 @@
 int main(int argc, char *argv[])
 {
     struct sigaction act;
-    domid_t domain_id;
     int num_pages;
     xenpaging_t *paging;
     xenpaging_victim_t *victims;
@@ -573,11 +572,10 @@
         return -1;
     }
 
-    domain_id = atoi(argv[1]);
     num_pages = atoi(argv[2]);
 
     /* Initialise domain paging */
-    paging = xenpaging_init(domain_id);
+    paging = xenpaging_init(atoi(argv[1]));
     if ( paging == NULL )
     {
         fprintf(stderr, "Error initialising paging");
@@ -585,10 +583,10 @@
     }
     xch = paging->xc_handle;
 
-    DPRINTF("starting %s %u %d\n", argv[0], domain_id, num_pages);
+    DPRINTF("starting %s %u %d\n", argv[0], paging->mem_event.domain_id, 
num_pages);
 
     /* Open file */
-    sprintf(filename, "page_cache_%d", domain_id);
+    sprintf(filename, "page_cache_%u", paging->mem_event.domain_id);
     fd = open(filename, open_flags, open_mode);
     if ( fd < 0 )
     {

_______________________________________________
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: remove local domain_id variable, Xen patchbot-unstable <=