]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
remove unused cr_plugin_columbia.c
authorMichel Normand <normand@fr.ibm.com>
Thu, 19 Nov 2009 14:06:02 +0000 (15:06 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 19 Nov 2009 14:06:02 +0000 (15:06 +0100)
Remove checkpoint / restart dead code.

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/Makefile.am
src/lxc/checkpoint.c
src/lxc/cr_plugin_columbia.c [deleted file]
src/lxc/lxc_plugin.h [deleted file]
src/lxc/restart.c

index 6840e156e13c1a53abf8b92f1fc0a5f6d165f19a..be64b2a78b7837378ca165b3544bbfd9a240268f 100644 (file)
@@ -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
 
index 7c35331a95af3742eead5939df4f92626a0a7d88..8acac310f80d185b7c289a936a59285b22313b32 100644 (file)
  * 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 (file)
index 3987e39..0000000
+++ /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 (file)
index 32b4e71..0000000
+++ /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
index ce8cd802f60cf3b084218b4fe9b9b0580ec24099..1f42b40e9dfae71c7337e111e95fd90b3dd6e2aa 100644 (file)
  * 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>