summaryrefslogtreecommitdiff
path: root/dix/registry.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-11-26 15:59:01 -0500
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-11-26 15:59:01 -0500
commit54cb729ecc2d366c1af836cb3d2ffc8e864e9b79 (patch)
tree55ef0446bbbff254afe3e0384edf7ea413366eac /dix/registry.c
parentdecd5a7c605e42c99b6a4523c8e1833b859d9b24 (diff)
registry: Add a call for DTRACE compatibility.
Diffstat (limited to 'dix/registry.c')
-rw-r--r--dix/registry.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/dix/registry.c b/dix/registry.c
index 02b42d46a..10fa21f84 100644
--- a/dix/registry.c
+++ b/dix/registry.c
@@ -218,6 +218,25 @@ LookupRequestName(int major, int minor)
}
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 *
LookupEventName(int event)
{
event &= 127;