aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Normand <normand@fr.ibm.com>2009-11-19 15:06:02 +0100
committerDaniel Lezcano <dlezcano@fr.ibm.com>2009-11-19 15:06:02 +0100
commit55237dfa662668638cb7f8dbe32b0764f89f6e94 (patch)
tree318e41dde15a71132fdc43810599a47144f59e38
parentlxc_init better error reporting (diff)
downloadlxc-55237dfa662668638cb7f8dbe32b0764f89f6e94.tar.gz
lxc-55237dfa662668638cb7f8dbe32b0764f89f6e94.tar.bz2
lxc-55237dfa662668638cb7f8dbe32b0764f89f6e94.zip
remove unused cr_plugin_columbia.c
Remove checkpoint / restart dead code. Signed-off-by: Michel Normand <normand@fr.ibm.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r--src/lxc/Makefile.am4
-rw-r--r--src/lxc/checkpoint.c18
-rw-r--r--src/lxc/cr_plugin_columbia.c121
-rw-r--r--src/lxc/lxc_plugin.h9
-rw-r--r--src/lxc/restart.c19
5 files changed, 2 insertions, 169 deletions
diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index 6840e15..be64b2a 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -43,9 +43,7 @@ liblxc_so_SOURCES = \
genl.c genl.h \
\
mainloop.c mainloop.h \
- af_unix.c af_unix.h \
- \
- cr_plugin_columbia.c lxc_plugin.h
+ af_unix.c af_unix.h
AM_CFLAGS=-I$(top_srcdir)/src
diff --git a/src/lxc/checkpoint.c b/src/lxc/checkpoint.c
index 7c35331..8acac31 100644
--- a/src/lxc/checkpoint.c
+++ b/src/lxc/checkpoint.c
@@ -20,24 +20,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define _GNU_SOURCE
-#include <stdio.h>
-#undef _GNU_SOURCE
-#include <fcntl.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/file.h>
-#include <netinet/in.h>
-#include <net/if.h>
-
+#include <lxc/lxc.h>
#include <lxc/log.h>
-#include "lxc_plugin.h"
lxc_log_define(lxc_checkpoint, lxc);
diff --git a/src/lxc/cr_plugin_columbia.c b/src/lxc/cr_plugin_columbia.c
deleted file mode 100644
index 3987e39..0000000
--- a/src/lxc/cr_plugin_columbia.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * lxc: linux Container library
- *
- * (C) Copyright IBM Corp. 2007, 2008
- *
- * Authors:
- * Daniel Lezcano <dlezcano at fr.ibm.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#define _GNU_SOURCE
-#include <stdio.h>
-#undef _GNU_SOURCE
-#include <fcntl.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/file.h>
-
-#include "error.h"
-#include <lxc.h>
-#include <lxc/log.h>
-
-lxc_log_define(lxc_columbia, lxc);
-
-
-
-#if __i386__
-# define __NR_checkpoint 333
-# define __NR_restart 334
-static inline long sys_checkpoint(pid_t pid, int fd, unsigned long flags)
-{
- return syscall(__NR_checkpoint, pid, fd, flags);
-}
-static inline long sys_restart(pid_t pid, int fd, unsigned long flags)
-{
- return syscall(__NR_restart, pid, fd, flags);
-}
-#elif __x86_64__
-# define __NR_checkpoint 295
-# define __NR_restart 296
-static inline long sys_checkpoint(pid_t pid, int fd, unsigned long flags)
-{
- return syscall(__NR_checkpoint, pid, fd, flags);
-}
-static inline long sys_restart(pid_t pid, int fd, unsigned long flags)
-{
- return syscall(__NR_restart, pid, fd, flags);
-}
-#else
-# warning "Architecture not supported for checkpoint"
-static inline long sys_checkpoint(pid_t pid, int fd, unsigned long flags)
-{
- errno = ENOSYS;
- return -1;
-}
-static inline long sys_restart(pid_t pid, int fd, unsigned long flags)
-{
- errno = ENOSYS;
- return -1;
-}
-# warning "Architecture not supported for restart syscall"
-
-#endif
-
-
-int lxc_plugin_checkpoint(pid_t pid, const char *statefile, unsigned long flags)
-{
- int fd, ret;
-
- fd = open(statefile, O_RDWR);
- if (fd < 0) {
- SYSERROR("failed to open init file for %s", statefile);
- return -1;
- }
-
- ret = sys_checkpoint(pid, fd, flags);
- if (ret < 0) {
- SYSERROR("failed to checkpoint %d", pid);
- goto out_close;
- }
-
- ret = 0;
-
-out_close:
- close(fd);
- return ret;
-}
-
-int lxc_plugin_restart(pid_t pid, const char *statefile, unsigned long flags)
-{
- int fd;
-
- fd = open(statefile, O_RDONLY);
- if (fd < 0) {
- SYSERROR("failed to open init file for %s", statefile);
- return -1;
- }
-
- sys_restart(pid, fd, flags);
- SYSERROR("failed to restart %d", pid);
- close(fd);
- return -1;
-}
diff --git a/src/lxc/lxc_plugin.h b/src/lxc/lxc_plugin.h
deleted file mode 100644
index 32b4e71..0000000
--- a/src/lxc/lxc_plugin.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _lxc_plugin_h
-#define _lxc_plugin_h
-
-#include <sys/types.h>
-
-extern int lxc_plugin_checkpoint(pid_t, const char *, unsigned long);
-extern int lxc_plugin_restart(pid_t, const char *, unsigned long);
-
-#endif
diff --git a/src/lxc/restart.c b/src/lxc/restart.c
index ce8cd80..1f42b40 100644
--- a/src/lxc/restart.c
+++ b/src/lxc/restart.c
@@ -20,25 +20,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
-#define _GNU_SOURCE
-#include <stdio.h>
-#undef _GNU_SOURCE
-#include <string.h>
-#include <stdlib.h>
-#include <dirent.h>
-#include <errno.h>
-#include <unistd.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/types.h>
-#include <sys/prctl.h>
-#include <sys/wait.h>
-#include <sys/mount.h>
-
-#include "error.h"
-#include "lxc_plugin.h"
#include <lxc/lxc.h>
#include <lxc/log.h>