ia64/xen-unstable

view tools/xcutils/xc_restore.c @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents 06d84bf87159
children bb37d167c82e
line source
1 /*
2 * This file is subject to the terms and conditions of the GNU General
3 * Public License. See the file "COPYING" in the main directory of
4 * this archive for more details.
5 *
6 * Copyright (C) 2005 by Christian Limpach
7 *
8 */
10 #include <err.h>
11 #include <stdlib.h>
12 #include <stdint.h>
13 #include <stdio.h>
15 #include <xenguest.h>
17 int
18 main(int argc, char **argv)
19 {
20 unsigned int xc_fd, io_fd, domid, nr_pfns, store_evtchn, console_evtchn;
21 int ret;
22 unsigned long store_mfn, console_mfn;
24 if (argc != 7)
25 errx(1,
26 "usage: %s xcfd iofd domid nr_pfns store_evtchn console_evtchn",
27 argv[0]);
29 xc_fd = atoi(argv[1]);
30 io_fd = atoi(argv[2]);
31 domid = atoi(argv[3]);
32 nr_pfns = atoi(argv[4]);
33 store_evtchn = atoi(argv[5]);
34 console_evtchn = atoi(argv[6]);
36 ret = xc_linux_restore(xc_fd, io_fd, domid, nr_pfns, store_evtchn,
37 &store_mfn, console_evtchn, &console_mfn);
38 if (ret == 0) {
39 printf("store-mfn %li\n", store_mfn);
40 printf("console-mfn %li\n", console_mfn);
41 fflush(stdout);
42 }
43 return ret;
44 }