From 787dc17c3bda226cdb500d89baece16d99b8a11f Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Wed, 7 Oct 2009 16:06:09 +0200 Subject: [PATCH] remove dead state code Remove old dead code. Signed-off-by: Daniel Lezcano --- src/lxc/state.c | 31 ------------------------------- 1 file changed, 31 deletions(-) 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]; -- 2.47.3