]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
remove dead stop code
authorDaniel Lezcano <dlezcano@fr.ibm.com>
Wed, 7 Oct 2009 14:06:08 +0000 (16:06 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Wed, 7 Oct 2009 14:06:08 +0000 (16:06 +0200)
Remove old dead code.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/stop.c

index 896ab3b20bbfb2f08db4a9335cbc008955446d9a..a88cb4e9db00a4c0b3db1bc4a0c18a96fd996774 100644 (file)
 
 lxc_log_define(lxc_stop, lxc);
 
-#define MAXPIDLEN 20
-
-int __lxc_stop(const char *name)
-{
-       char init[MAXPATHLEN];
-       char val[MAXPIDLEN];
-       int fd, ret = -1;
-       size_t pid;
-
-       if (lxc_check_lock(name) < 0)
-               return ret;
-
-       snprintf(init, MAXPATHLEN, LXCPATH "/%s/init", name);
-       fd = open(init, O_RDONLY);
-       if (fd < 0) {
-               SYSERROR("failed to open init file for %s", name);
-               goto out_close;
-       }
-
-       if (read(fd, val, sizeof(val)) < 0) {
-               SYSERROR("failed to read %s", init);
-               goto out_close;
-       }
-
-       pid = atoi(val);
-
-       if (kill(pid, SIGKILL)) {
-               SYSERROR("failed to kill %zd", pid);
-               goto out_close;
-       }
-
-       ret = 0;
-
-out_close:
-       close(fd);
-       return ret;
-}
-
 int lxc_stop(const char *name)
 {
        struct lxc_command command = {