# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1307437215 -7200
# Node ID 46c9f04365804c08a454b82e76119c43df4d7fa0
# Parent 8eb07742f96854303ad7793f9319cd314dcf7be3
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>
diff -r 8eb07742f968 -r 46c9f0436580 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c Tue Jun 07 11:00:14 2011 +0200
+++ b/tools/xenpaging/xenpaging.c Tue Jun 07 11:00:15 2011 +0200
@@ -515,7 +515,6 @@ static int evict_victim(xenpaging_t *pag
int main(int argc, char *argv[])
{
struct sigaction act;
- domid_t domain_id;
int num_pages;
xenpaging_t *paging;
xenpaging_victim_t *victims;
@@ -536,11 +535,10 @@ int main(int argc, char *argv[])
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");
@@ -548,10 +546,10 @@ int main(int argc, char *argv[])
}
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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|