ia64/xen-unstable

view tools/xcutils/xc_restore.c @ 6432:b54144915ae6

merge?
author cl349@firebug.cl.cam.ac.uk
date Thu Aug 25 16:26:30 2005 +0000 (2005-08-25)
parents 3428d58a85e1 fdfd511768a3
children 0610add7c3fe
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, evtchn;
21 int ret;
22 unsigned long mfn;
24 if (argc != 6)
25 errx(1, "usage: %s xcfd iofd domid nr_pfns evtchn", argv[0]);
27 xc_fd = atoi(argv[1]);
28 io_fd = atoi(argv[2]);
29 domid = atoi(argv[3]);
30 nr_pfns = atoi(argv[4]);
31 evtchn = atoi(argv[5]);
33 ret = xc_linux_restore(xc_fd, io_fd, domid, nr_pfns, evtchn, &mfn);
34 if (ret == 0) {
35 printf("store-mfn %li\n", mfn);
36 fflush(stdout);
37 }
38 return ret;
39 }