loader: Remove the handle field from LoaderOpen
This was always 0 from all the callers. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
		
							parent
							
								
									09929da505
								
							
						
					
					
						commit
						2f003fe496
					
				| 
						 | 
					@ -174,7 +174,7 @@ LoaderInit(void)
 | 
				
			||||||
	    path = uwcrtpath; /* fallback: try to get libcrt.a from the uccs */
 | 
						    path = uwcrtpath; /* fallback: try to get libcrt.a from the uccs */
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
	    path = xcrtpath; /* get the libcrt.a we compiled with */
 | 
						    path = xcrtpath; /* get the libcrt.a we compiled with */
 | 
				
			||||||
	LoaderOpen (path, 0, &errmaj, &errmin, &wasLoaded);
 | 
						LoaderOpen (path, &errmaj, &errmin, &wasLoaded, 0);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -203,8 +203,8 @@ do_dlopen(loaderPtr modrec, int flags)
 | 
				
			||||||
/* Public Interface to the loader. */
 | 
					/* Public Interface to the loader. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
LoaderOpen(const char *module, int handle,
 | 
					LoaderOpen(const char *module, int *errmaj, int *errmin, int *wasLoaded,
 | 
				
			||||||
	   int *errmaj, int *errmin, int *wasLoaded, int flags)
 | 
					           int flags)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    loaderPtr tmp;
 | 
					    loaderPtr tmp;
 | 
				
			||||||
    int new_handle;
 | 
					    int new_handle;
 | 
				
			||||||
| 
						 | 
					@ -214,22 +214,20 @@ LoaderOpen(const char *module, int handle,
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Is the module already loaded? */
 | 
					    /* Is the module already loaded? */
 | 
				
			||||||
    if (handle >= 0) {
 | 
					    tmp = listHead;
 | 
				
			||||||
	tmp = listHead;
 | 
					    while (tmp) {
 | 
				
			||||||
	while (tmp) {
 | 
					 | 
				
			||||||
#ifdef DEBUGLIST
 | 
					#ifdef DEBUGLIST
 | 
				
			||||||
	    ErrorF("strcmp(%x(%s),{%x} %x(%s))\n", module, module,
 | 
					        ErrorF("strcmp(%x(%s),{%x} %x(%s))\n", module, module,
 | 
				
			||||||
		   &(tmp->name), tmp->name, tmp->name);
 | 
					               &(tmp->name), tmp->name, tmp->name);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	    if (!strcmp(module, tmp->name)) {
 | 
					        if (!strcmp(module, tmp->name)) {
 | 
				
			||||||
		refCount[tmp->handle]++;
 | 
					            refCount[tmp->handle]++;
 | 
				
			||||||
		if (wasLoaded)
 | 
					            if (wasLoaded)
 | 
				
			||||||
		    *wasLoaded = 1;
 | 
					                *wasLoaded = 1;
 | 
				
			||||||
		xf86MsgVerb(X_INFO, 2, "Reloading %s\n", module);
 | 
					            xf86MsgVerb(X_INFO, 2, "Reloading %s\n", module);
 | 
				
			||||||
		return tmp->handle;
 | 
					            return tmp->handle;
 | 
				
			||||||
	    }
 | 
					        }
 | 
				
			||||||
	    tmp = tmp->next;
 | 
					        tmp = tmp->next;
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*
 | 
					    /*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,7 +86,7 @@ extern const ModuleVersions LoaderVersionInfo;
 | 
				
			||||||
extern unsigned long LoaderOptions;
 | 
					extern unsigned long LoaderOptions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Internal Functions */
 | 
					/* Internal Functions */
 | 
				
			||||||
int LoaderOpen(const char *, int, int *, int *, int *, int);
 | 
					int LoaderOpen(const char *, int *, int *, int *, int);
 | 
				
			||||||
int LoaderHandleOpen(int);
 | 
					int LoaderHandleOpen(int);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _LOADER_H */
 | 
					#endif /* _LOADER_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -926,7 +926,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
 | 
				
			||||||
	    *errmin = 0;
 | 
						    *errmin = 0;
 | 
				
			||||||
	goto LoadModule_fail;
 | 
						goto LoadModule_fail;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ret->handle = LoaderOpen(found, 0, errmaj, errmin, &wasLoaded, flags);
 | 
					    ret->handle = LoaderOpen(found, errmaj, errmin, &wasLoaded, flags);
 | 
				
			||||||
    if (ret->handle < 0)
 | 
					    if (ret->handle < 0)
 | 
				
			||||||
	goto LoadModule_fail;
 | 
						goto LoadModule_fail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue