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

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

index 97b4026cb4bbbef91ab019520924f1d7d958f99d..06b7b632f2ed5d90e05147f3be6f2090ef8693f4 100644 (file)
@@ -69,37 +69,6 @@ int lxc_rmstate(const char *name)
        return 0;
 }
 
-lxc_state_t __lxc_getstate(const char *name)
-{
-       int fd, err;
-       char file[MAXPATHLEN];
-
-       snprintf(file, MAXPATHLEN, LXCPATH "/%s/state", name);
-
-       fd = open(file, O_RDONLY);
-       if (fd < 0) {
-               SYSERROR("failed to open %s", file);
-               return -1;
-       }
-
-       if (flock(fd, LOCK_SH)) {
-               SYSERROR("failed to take the lock to %s", file);
-               close(fd);
-               return -1;
-       }
-
-       err = read(fd, file, strlen(file));
-       if (err < 0) {
-               SYSERROR("failed to read file %s", file);
-               close(fd);
-               return -1;
-       }
-       file[err] = '\0';
-
-       close(fd);
-       return lxc_str2state(file);
-}
-
 static int freezer_state(const char *name)
 {
        char freezer[MAXPATHLEN];