aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenpaging/xenpaging.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2011-06-10 10:47:20 +0200
committerOlaf Hering <olaf@aepfle.de>2011-06-10 10:47:20 +0200
commite897a5e81842d73b712036b437d31f981c871177 (patch)
tree40a788944c556a1d2fbadbee07b191ad159976b9 /tools/xenpaging/xenpaging.c
parente9f6c46e23434ed7155ce637cc90b5ef21dac015 (diff)
downloadxen-e897a5e81842d73b712036b437d31f981c871177.tar.gz
xen-e897a5e81842d73b712036b437d31f981c871177.tar.bz2
xen-e897a5e81842d73b712036b437d31f981c871177.zip
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@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/xenpaging/xenpaging.c')
-rw-r--r--tools/xenpaging/xenpaging.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c
index 6ede98768f..ad128bd6cb 100644
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -552,7 +552,6 @@ static int evict_victim(xenpaging_t *paging,
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 @@ 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");
@@ -585,10 +583,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 )
{