From: Michel Normand Date: Thu, 19 Nov 2009 14:06:02 +0000 (+0100) Subject: remove unused cr_plugin_columbia.c X-Git-Tag: lxc_0_6_4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55237dfa662668638cb7f8dbe32b0764f89f6e94;p=thirdparty%2Flxc.git remove unused cr_plugin_columbia.c Remove checkpoint / restart dead code. Signed-off-by: Michel Normand Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index 6840e156e..be64b2a78 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 7c35331a9..8acac310f 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 -#undef _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include #include -#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 3987e3928..000000000 --- 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 - * - * 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 -#undef _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "error.h" -#include -#include - -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 32b4e7136..000000000 --- a/src/lxc/lxc_plugin.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _lxc_plugin_h -#define _lxc_plugin_h - -#include - -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 ce8cd802f..1f42b40e9 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 -#undef _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "error.h" -#include "lxc_plugin.h" #include #include