registry: Add a call for DTRACE compatibility.
This commit is contained in:
parent
decd5a7c60
commit
54cb729ecc
|
@ -217,6 +217,25 @@ LookupRequestName(int major, int minor)
|
||||||
return requests[major][minor] ? requests[major][minor] : XREGISTRY_UNKNOWN;
|
return requests[major][minor] ? requests[major][minor] : XREGISTRY_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
LookupMajorName(int major)
|
||||||
|
{
|
||||||
|
if (major < 128) {
|
||||||
|
const char *retval;
|
||||||
|
|
||||||
|
if (major >= nmajor)
|
||||||
|
return XREGISTRY_UNKNOWN;
|
||||||
|
if (0 >= nminor[major])
|
||||||
|
return XREGISTRY_UNKNOWN;
|
||||||
|
|
||||||
|
retval = requests[major][0];
|
||||||
|
return retval ? retval + sizeof(CORE) : XREGISTRY_UNKNOWN;
|
||||||
|
} else {
|
||||||
|
ExtensionEntry *extEntry = GetExtensionEntry(major);
|
||||||
|
return extEntry ? extEntry->name : XREGISTRY_UNKNOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
LookupEventName(int event)
|
LookupEventName(int event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -289,6 +289,11 @@ _X_HIDDEN void *dixLookupTab[] = {
|
||||||
/* registry.c */
|
/* registry.c */
|
||||||
#ifdef XREGISTRY
|
#ifdef XREGISTRY
|
||||||
SYMFUNC(RegisterResourceName)
|
SYMFUNC(RegisterResourceName)
|
||||||
|
SYMFUNC(LookupMajorName)
|
||||||
|
SYMFUNC(LookupRequestName)
|
||||||
|
SYMFUNC(LookupEventName)
|
||||||
|
SYMFUNC(LookupErrorName)
|
||||||
|
SYMFUNC(LookupResourceName)
|
||||||
#endif
|
#endif
|
||||||
/* swaprep.c */
|
/* swaprep.c */
|
||||||
SYMFUNC(CopySwap32Write)
|
SYMFUNC(CopySwap32Write)
|
||||||
|
|
|
@ -29,6 +29,7 @@ void RegisterExtensionNames(ExtensionEntry *ext);
|
||||||
/*
|
/*
|
||||||
* Lookup functions. The returned string must not be modified or freed.
|
* Lookup functions. The returned string must not be modified or freed.
|
||||||
*/
|
*/
|
||||||
|
const char *LookupMajorName(int major);
|
||||||
const char *LookupRequestName(int major, int minor);
|
const char *LookupRequestName(int major, int minor);
|
||||||
const char *LookupEventName(int event);
|
const char *LookupEventName(int event);
|
||||||
const char *LookupErrorName(int error);
|
const char *LookupErrorName(int error);
|
||||||
|
@ -51,6 +52,7 @@ void dixResetRegistry(void);
|
||||||
#define RegisterResourceName(a, b) { ; }
|
#define RegisterResourceName(a, b) { ; }
|
||||||
#define RegisterExtensionNames(a) { ; }
|
#define RegisterExtensionNames(a) { ; }
|
||||||
|
|
||||||
|
#define LookupMajorName(a) XREGISTRY_UNKNOWN
|
||||||
#define LookupRequestName(a, b) XREGISTRY_UNKNOWN
|
#define LookupRequestName(a, b) XREGISTRY_UNKNOWN
|
||||||
#define LookupEventName(a) XREGISTRY_UNKNOWN
|
#define LookupEventName(a) XREGISTRY_UNKNOWN
|
||||||
#define LookupErrorName(a) XREGISTRY_UNKNOWN
|
#define LookupErrorName(a) XREGISTRY_UNKNOWN
|
||||||
|
|
Loading…
Reference in New Issue
Block a user