ia64/xen-unstable

view tools/xcutils/xc_restore.c @ 6946:e703abaf6e3d

Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
author emellor@ewan
date Sun Sep 18 14:42:13 2005 +0100 (2005-09-18)
parents 3233e7ecfa9f
children 06d84bf87159
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 }