From: Daniel Lezcano Date: Wed, 7 Oct 2009 14:06:09 +0000 (+0200) Subject: remove dead state code X-Git-Tag: lxc_0_6_4~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=787dc17c3bda226cdb500d89baece16d99b8a11f;p=thirdparty%2Flxc.git remove dead state code Remove old dead code. Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/state.c b/src/lxc/state.c index 97b4026cb..06b7b632f 100644 --- a/src/lxc/state.c +++ b/src/lxc/state.c @@ -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];