]> git.proxmox.com Git - mirror_lxc.git/commitdiff
remove lxc_error_t enum that is now useless
authorMichel Normand <normand@fr.ibm.com>
Mon, 18 May 2009 20:30:39 +0000 (22:30 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 18 May 2009 20:30:39 +0000 (22:30 +0200)
There is no more need of the LXC_ERROR defines
and related lxc_strerror function.

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/error.c
src/lxc/error.h

index 9a6634472c77c4fc292a720f55d1a498494ca78c..5ecfbac7fe957b9cee79b44aeeb44dd11e00a3a5 100644 (file)
 
 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
index 3cbbb20ed440c7d41c908747dd6c95b1dc45bbda..ef25fc3912720f12629c2e2353e1f35aea99f6cb 100644 (file)
 #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