aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lxc/error.c43
-rw-r--r--src/lxc/error.h37
2 files changed, 1 insertions, 79 deletions
diff --git a/src/lxc/error.c b/src/lxc/error.c
index 9a66344..5ecfbac 100644
--- a/src/lxc/error.c
+++ b/src/lxc/error.c
@@ -29,49 +29,6 @@
lxc_log_define(lxc_error, lxc);
-static const char *const catalogue[] = {
-
- [LXC_ERROR_LOCK] = "Failed to lock the container",
-
- [LXC_ERROR_ESRCH] = "The container is empty",
- [LXC_ERROR_EEXIST] = "The container already exists",
- [LXC_ERROR_EBUSY] = "The container is busy",
- [LXC_ERROR_ENOENT] = "The container was not found",
- [LXC_ERROR_EACCES] = "Not enough privilege to use the container",
- [LXC_ERROR_WRONG_COMMAND] = "Wrong command",
-
- [LXC_ERROR_CONF_CGROUP] = "Failed to configure the control group",
- [LXC_ERROR_CONF_MOUNT] = "Failed to configure the mount points",
- [LXC_ERROR_CONF_UTSNAME] = "Failed to configure the utsname",
- [LXC_ERROR_CONF_NETWORK] = "Failed to configure the network",
- [LXC_ERROR_CONF_TTY] = "Failed to configure the tty",
- [LXC_ERROR_CONF_ROOTFS] = "Failed to configure the root fs",
- [LXC_ERROR_CONF_PTS] = "Failed to configure the pts",
-
- [LXC_ERROR_SETUP_CGROUP] = "Failed to setup the control group",
- [LXC_ERROR_SETUP_MOUNT] = "Failed to setup the mount points",
- [LXC_ERROR_SETUP_UTSNAME] = "Failed to setup the utsname",
- [LXC_ERROR_SETUP_NETWORK] = "Failed to setup the network",
- [LXC_ERROR_SETUP_CONSOLE] = "Failed to setup the console",
- [LXC_ERROR_SETUP_TTY] = "Failed to setup the tty",
- [LXC_ERROR_SETUP_ROOTFS] = "Failed to setup the root fs",
- [LXC_ERROR_SETUP_PTS] = "Failed to setup the new pts instance",
-
- [LXC_ERROR_TTY_DENIED] = "tty service denied",
- [LXC_ERROR_TTY_EAGAIN] = "tty service is not available",
- [LXC_ERROR_INTERNAL] = "Internal system error",
-};
-
-const char *const lxc_strerror(int error)
-{
- error = abs(error);
-
- if (error >= LXC_LAST_ERROR)
- return NULL;
-
- return catalogue[error];
-}
-
/*---------------------------------------------------------------------------*/
/* lxc_error_set_and_log
* function is here to convert
diff --git a/src/lxc/error.h b/src/lxc/error.h
index 3cbbb20..ef25fc3 100644
--- a/src/lxc/error.h
+++ b/src/lxc/error.h
@@ -23,41 +23,6 @@
#ifndef __lxc_error_h
#define __lxc_error_h
-typedef enum {
- LXC_SUCCESS, /* 0 == success ;) */
-
- LXC_ERROR_LOCK,
-
- LXC_ERROR_ESRCH,
- LXC_ERROR_EEXIST,
- LXC_ERROR_EBUSY,
- LXC_ERROR_ENOENT,
- LXC_ERROR_EACCES,
- LXC_ERROR_WRONG_COMMAND,
-
- LXC_ERROR_CONF_CGROUP,
- LXC_ERROR_CONF_MOUNT,
- LXC_ERROR_CONF_UTSNAME,
- LXC_ERROR_CONF_NETWORK,
- LXC_ERROR_CONF_TTY,
- LXC_ERROR_CONF_ROOTFS,
- LXC_ERROR_CONF_PTS,
-
- LXC_ERROR_SETUP_CGROUP,
- LXC_ERROR_SETUP_MOUNT,
- LXC_ERROR_SETUP_UTSNAME,
- LXC_ERROR_SETUP_NETWORK,
- LXC_ERROR_SETUP_CONSOLE,
- LXC_ERROR_SETUP_TTY,
- LXC_ERROR_SETUP_ROOTFS,
- LXC_ERROR_SETUP_PTS,
-
- LXC_ERROR_TTY_DENIED,
- LXC_ERROR_TTY_EAGAIN,
- LXC_ERROR_INTERNAL,
-
- LXC_LAST_ERROR,
-} lxc_error_t;
-
extern int lxc_error_set_and_log(int pid, int status);
+
#endif