diff options
author | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-05-24 17:47:14 +0000 |
---|---|---|
committer | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-05-24 17:47:14 +0000 |
commit | 23999c8bc1e94a98dbf1a920c58c1720528a2ab3 (patch) | |
tree | f43d534b5798b3d6d419df5e181763c7df147757 /tools/xcutils | |
parent | e8968bea9c93d8a475813d02957d05078dfa837f (diff) | |
download | xen-23999c8bc1e94a98dbf1a920c58c1720528a2ab3.tar.gz xen-23999c8bc1e94a98dbf1a920c58c1720528a2ab3.tar.bz2 xen-23999c8bc1e94a98dbf1a920c58c1720528a2ab3.zip |
bitkeeper revision 1.1527.2.1 (429368a2F0SR4yrzuHsrRucuwriYqA)
Implement the parts of vm save which need interaction with xend
as part of xend, instead of using xfrd.
Execute xc_linux_save in a seperate process so that it can't
crash xend. Also handle errors passed from xc_linux_save.
xen_domain.c:
Disable save in xfrd.
xc_save.c:
new file
Makefile:
Add xc_save.
XendDomainInfo.py:
Add suspended state and threading Condition with notification, allowing
easy waiting for state changes.
XendDomain.py:
Implement the parts of vm save which need interaction with xend
as part of xend, instead of using xfrd. Set state to "suspended"
when detecting a suspended domain.
Fix reading output from subprocesses.
Fix ValueError in xen_domain().
xc.c:
Remove python binding for xc_linux_save.
xc_linux_save.c:
Implement the parts of vm save which need interaction with xend
as part of xend, instead of using xfrd. Also run xc_linux_save
in a seperate process.
xc_linux_restore.c:
Flush output so that xend picks it up timely.
Also disable debug output again.
xc.h:
Update xc_linux_save prototype and fix comments for xc_linux_{save,restore}.
ignore:
Add tools/xcutils/xc_save.
xpopen.py:
Exit with 127 if exec fails.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'tools/xcutils')
-rw-r--r-- | tools/xcutils/Makefile | 3 | ||||
-rw-r--r-- | tools/xcutils/xc_save.c | 29 |
2 files changed, 31 insertions, 1 deletions
diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile index 71c3c6a404..613358df8b 100644 --- a/tools/xcutils/Makefile +++ b/tools/xcutils/Makefile @@ -28,9 +28,10 @@ CFLAGS += $(INCLUDES) CFLAGS += -Wp,-MD,.$(@F).d PROG_DEP = .*.d -PROGRAMS = xc_restore +PROGRAMS = xc_restore xc_save xc_restore_OBJS = xc_restore.o +xc_save_OBJS = xc_save.o LDLIBS = -L$(XEN_LIBXC) -L$(XEN_LIBXUTIL) -lxc -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); +} |