aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-05-24 17:50:58 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-05-24 17:50:58 +0000
commit04ef79a4104b1ff8fb2686b636dce089f02338dc (patch)
treecfe9323b66772722c1cbc6b11845fa0ca1ecd7ff /tools/xcutils
parent03f0a338a81688df368029b496f363ca84975b8c (diff)
parent23999c8bc1e94a98dbf1a920c58c1720528a2ab3 (diff)
downloadxen-04ef79a4104b1ff8fb2686b636dce089f02338dc.tar.gz
xen-04ef79a4104b1ff8fb2686b636dce089f02338dc.tar.bz2
xen-04ef79a4104b1ff8fb2686b636dce089f02338dc.zip
bitkeeper revision 1.1527.1.3 (42936982HEfOXuPvsCgdi5IHEHax_Q)
Don't need xc_save_OBJS with updated Makefile. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'tools/xcutils')
-rw-r--r--tools/xcutils/Makefile2
-rw-r--r--tools/xcutils/xc_save.c29
2 files changed, 30 insertions, 1 deletions
diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile
index 1dc682ff33..1175ff5713 100644
--- a/tools/xcutils/Makefile
+++ b/tools/xcutils/Makefile
@@ -28,7 +28,7 @@ CFLAGS += $(INCLUDES)
CFLAGS += -Wp,-MD,.$(@F).d
PROG_DEP = .*.d
-PROGRAMS = xc_restore
+PROGRAMS = xc_restore xc_save
LDLIBS = -L$(XEN_LIBXC) -lxc -L$(XEN_LIBXUTIL) -lxutil
diff --git a/tools/xcutils/xc_save.c b/tools/xcutils/xc_save.c
new file mode 100644
index 0000000000..6ca1d5cc6c
--- /dev/null
+++ b/tools/xcutils/xc_save.c
@@ -0,0 +1,29 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file "COPYING" in the main directory of
+ * this archive for more details.
+ *
+ * Copyright (C) 2005 by Christian Limpach
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <err.h>
+
+#include <xc.h>
+
+int
+main(int argc, char **argv)
+{
+ unsigned int xc_fd, io_fd, domid;
+
+ if (argc != 4)
+ errx(1, "usage: %s xcfd iofd domid", argv[0]);
+
+ xc_fd = atoi(argv[1]);
+ io_fd = atoi(argv[2]);
+ domid = atoi(argv[3]);
+
+ return xc_linux_save(xc_fd, io_fd, domid);
+}