From ef533a912d18db31456b29a18c8bced649309565 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 1 Mar 2016 08:29:06 -0500 Subject: [PATCH] loader: Remove unused loader error codes and dead enum The enum has been unused since at least the removal of elfloader. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson --- hw/xfree86/common/xf86Module.h | 15 +-------------- hw/xfree86/loader/loadmod.c | 18 ------------------ 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 7d09a1bcc..ff0e23ee5 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -49,13 +49,6 @@ #define NULL ((void *)0) #endif -typedef enum { - LD_RESOLV_IFDONE = 0, /* only check if no more - delays pending */ - LD_RESOLV_NOW = 1, /* finish one delay step */ - LD_RESOLV_FORCE = 2 /* force checking... */ -} LoaderResolveOptions; - #define DEFAULT_LIST ((char *)-1) /* Built-in ABI classes. These definitions must not be changed. */ @@ -92,19 +85,13 @@ typedef enum { #define MODULEVENDORSTRING "X.Org Foundation" #endif -/* Error return codes for errmaj. New codes must only be added at the end. */ +/* Error return codes for errmaj */ typedef enum { LDR_NOERROR = 0, LDR_NOMEM, /* memory allocation failed */ LDR_NOENT, /* Module file does not exist */ - LDR_NOSUBENT, /* pre-requsite file to be sub-loaded does not exist */ - LDR_NOSPACE, /* internal module array full */ - LDR_NOMODOPEN, /* module file could not be opened (check errmin) */ - LDR_UNKTYPE, /* file is not a recognized module type */ LDR_NOLOAD, /* type specific loader failed */ LDR_ONCEONLY, /* Module should only be loaded once (not an error) */ - LDR_NOPORTOPEN, /* could not open port (check errmin) */ - LDR_NOHARDWARE, /* could not query/initialize the hardware device */ LDR_MISMATCH, /* the module didn't match the spec'd requirments */ LDR_BADUSAGE, /* LoadModule is called with bad arguments */ LDR_INVALID, /* The module doesn't have a valid ModuleData object */ diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index d326d9d32..85689be41 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -1094,18 +1094,6 @@ LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) case LDR_NOENT: msg = "module does not exist"; break; - case LDR_NOSUBENT: - msg = "a required submodule could not be loaded"; - break; - case LDR_NOSPACE: - msg = "too many modules"; - break; - case LDR_NOMODOPEN: - msg = "open failed"; - break; - case LDR_UNKTYPE: - msg = "unknown module type"; - break; case LDR_NOLOAD: msg = "loader failed"; break; @@ -1113,12 +1101,6 @@ LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) msg = "already loaded"; type = X_INFO; break; - case LDR_NOPORTOPEN: - msg = "port open failed"; - break; - case LDR_NOHARDWARE: - msg = "no hardware found"; - break; case LDR_MISMATCH: msg = "module requirement mismatch"; break;