[PATCH xserver 09/19] loader: Remove unused loader error codes and dead enum

Adam Jackson ajax at redhat.com
Mon Jan 23 19:32:23 UTC 2017


The enum has been unused since at least the removal of elfloader.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 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 7d09a1b..ff0e23e 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 d326d9d..85689be 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;
-- 
2.9.3



More information about the xorg-devel mailing list