summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-12-11 00:58:25 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-12-18 16:51:45 -0800
commita11c58fa0c5809f918b36b84be53385cb2d8ea59 (patch)
treed5b4416102f59a6abe3a86026bd6b5febb2ca26a /Xext
parenteb750f8b5e14751d4c40b50499baec5d2ba79db9 (diff)
Ensure all resource types created have names registered
Calls RegisterResourceName to record the type name for use by X-Resource, XACE/SELinux/XTsol, and DTrace. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/mbuf.c7
-rw-r--r--Xext/panoramiX.c6
-rw-r--r--Xext/saver.c4
-rw-r--r--Xext/shape.c3
-rw-r--r--Xext/shm.c2
-rw-r--r--Xext/sleepuntil.c2
-rw-r--r--Xext/sync.c6
-rw-r--r--Xext/xvdisp.c3
-rw-r--r--Xext/xvmain.c15
-rw-r--r--Xext/xvmc.c4
10 files changed, 48 insertions, 4 deletions
diff --git a/Xext/mbuf.c b/Xext/mbuf.c
index af312212f..02354b0ac 100644
--- a/Xext/mbuf.c
+++ b/Xext/mbuf.c
@@ -42,6 +42,8 @@ in this Software without prior written authorization from The Open Group.
#include "opaque.h"
#include "sleepuntil.h"
#include "inputstr.h"
+#include "registry.h"
+
#include <X11/extensions/multibufconst.h>
#include <X11/extensions/multibufproto.h>
@@ -481,6 +483,11 @@ MultibufferExtensionInit()
ProcMultibufferDispatch, SProcMultibufferDispatch,
MultibufferResetProc, StandardMinorOpcode)))
{
+ RegisterResourceName(MultibufferDrawableResType,
+ "MultibufferDrawable");
+ RegisterResourceName(MultibufferResType, "MultibufferBuffer");
+ RegisterResourceName(MultibuffersResType, "MultibufferWindow");
+ RegisterResourceName(OtherClientResType, "MultibufferOtherClient");
MultibufferEventBase = extEntry->eventBase;
MultibufferErrorBase = extEntry->errorBase;
EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent;
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index f48bd36a6..2a950eefc 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -52,6 +52,7 @@ Equipment Corporation.
#include "globals.h"
#include "servermd.h"
#include "resource.h"
+#include "registry.h"
#ifdef RENDER
#include "picturestr.h"
#endif
@@ -513,6 +514,11 @@ void PanoramiXExtensionInit(int argc, char *argv[])
XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource);
if (XRT_WINDOW && XRT_PIXMAP && XRT_GC && XRT_COLORMAP) {
+ RegisterResourceName(XRT_WINDOW, "XineramaWindow");
+ RegisterResourceName(XRT_PIXMAP, "XineramaPixmap");
+ RegisterResourceName(XRT_GC, "XineramaGC");
+ RegisterResourceName(XRT_COLORMAP, "XineramaColormap");
+
panoramiXGeneration = serverGeneration;
success = TRUE;
}
diff --git a/Xext/saver.c b/Xext/saver.c
index 04e6497bd..5757f8519 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -47,6 +47,7 @@ in this Software without prior written authorization from the X Consortium.
#include "cursorstr.h"
#include "colormapst.h"
#include "xace.h"
+#include "registry.h"
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
@@ -266,6 +267,9 @@ ScreenSaverExtensionInit(INITARGS)
ProcScreenSaverDispatch, SProcScreenSaverDispatch,
NULL, StandardMinorOpcode)))
{
+ RegisterResourceName(AttrType, "SaverAttr");
+ RegisterResourceName(SaverEventType, "SaverEvent");
+ RegisterResourceName(SuspendType, "SaverSuspend");
ScreenSaverEventBase = extEntry->eventBase;
EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent;
}
diff --git a/Xext/shape.c b/Xext/shape.c
index 700fe76d1..247f21bee 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -40,6 +40,7 @@ in this Software without prior written authorization from The Open Group.
#include "extnsionst.h"
#include "dixstruct.h"
#include "resource.h"
+#include "registry.h"
#include "opaque.h"
#include <X11/extensions/shapeproto.h>
#include "regionstr.h"
@@ -134,6 +135,8 @@ ShapeExtensionInit(void)
ProcShapeDispatch, SProcShapeDispatch,
NULL, StandardMinorOpcode)))
{
+ RegisterResourceName(ClientType, "ShapeClient");
+ RegisterResourceName(ShapeEventType, "ShapeEvent");
ShapeEventBase = extEntry->eventBase;
EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent;
}
diff --git a/Xext/shm.c b/Xext/shm.c
index 9e462f216..589155d0d 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -52,6 +52,7 @@ in this Software without prior written authorization from The Open Group.
#include "servermd.h"
#include "shmint.h"
#include "xace.h"
+#include "registry.h"
#include <X11/extensions/shmproto.h>
#include <X11/Xfuncproto.h>
#include "protocol-versions.h"
@@ -283,6 +284,7 @@ ShmExtensionInit(INITARGS)
ProcShmDispatch, SProcShmDispatch,
ShmResetProc, StandardMinorOpcode)))
{
+ RegisterResourceName(ShmSegType, "ShmSeg");
ShmReqCode = (unsigned char)extEntry->base;
ShmCompletionCode = extEntry->eventBase;
BadShmSegCode = extEntry->errorBase;
diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c
index 2616a5e5b..6b5964ec7 100644
--- a/Xext/sleepuntil.c
+++ b/Xext/sleepuntil.c
@@ -39,6 +39,7 @@ in this Software without prior written authorization from The Open Group.
#include "dixstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
+#include "registry.h"
typedef struct _Sertafied {
struct _Sertafied *next;
@@ -90,6 +91,7 @@ ClientSleepUntil (ClientPtr client,
SertafiedResType = CreateNewResourceType (SertafiedDelete);
if (!SertafiedResType)
return FALSE;
+ RegisterResourceName(SertafiedResType, "ClientSleep");
SertafiedGeneration = serverGeneration;
BlockHandlerRegistered = FALSE;
}
diff --git a/Xext/sync.c b/Xext/sync.c
index d8a2b1535..b3bba1734 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -64,6 +64,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "extnsionst.h"
#include "dixstruct.h"
#include "resource.h"
+#include "registry.h"
#include "opaque.h"
#include <X11/extensions/syncproto.h>
#include "syncsrv.h"
@@ -878,6 +879,7 @@ SyncCreateSystemCounter(
{
return NULL;
}
+ RegisterResourceName(RTCounter, "SyncCounter");
}
pCounter = SyncCreateCounter(NULL, FakeClientID(0), initial);
@@ -2133,6 +2135,10 @@ SyncExtensionInit(void)
return;
}
+ RegisterResourceName(RTCounter, "SyncCounter");
+ RegisterResourceName(RTAlarm, "SyncAlarm");
+ RegisterResourceName(RTAwait, "SyncAwait");
+ RegisterResourceName(RTAlarmClient, "SyncAlarmClient");
SyncEventBase = extEntry->eventBase;
SyncErrorBase = extEntry->errorBase;
EventSwapVector[SyncEventBase + XSyncCounterNotify] = (EventSwapPtr) SCounterNotifyEvent;
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 1f3fc0f3d..e674dfdca 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -36,6 +36,7 @@ SOFTWARE.
#include "gcstruct.h"
#include "dixstruct.h"
#include "resource.h"
+#include "registry.h"
#include "opaque.h"
#include <X11/extensions/Xv.h>
@@ -1867,6 +1868,8 @@ void XineramifyXv(void)
if (!xvsp0 || !XvXRTPort) return;
+ RegisterResourceName(XvXRTPort, "XvXRTPort");
+
for(i = 0; i < xvsp0->nAdaptors; i++) {
refAdapt = xvsp0->pAdaptors + i;
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 7c8a3c3d4..c33c209a9 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -90,6 +90,7 @@ SOFTWARE.
#include "extnsionst.h"
#include "dixstruct.h"
#include "resource.h"
+#include "registry.h"
#include "opaque.h"
#include "input.h"
@@ -213,36 +214,42 @@ CreateResourceTypes(void)
ErrorF("CreateResourceTypes: failed to allocate port resource.\n");
return FALSE;
}
-
+ RegisterResourceName(XvRTPort, "XvRTPort");
+
if (!(XvRTGrab = CreateNewResourceType(XvdiDestroyGrab)))
{
ErrorF("CreateResourceTypes: failed to allocate grab resource.\n");
return FALSE;
}
-
+ RegisterResourceName(XvRTGrab, "XvRTGrab");
+
if (!(XvRTEncoding = CreateNewResourceType(XvdiDestroyEncoding)))
{
ErrorF("CreateResourceTypes: failed to allocate encoding resource.\n");
return FALSE;
}
-
+ RegisterResourceName(XvRTEncoding, "XvRTEncoding");
+
if (!(XvRTVideoNotify = CreateNewResourceType(XvdiDestroyVideoNotify)))
{
ErrorF("CreateResourceTypes: failed to allocate video notify resource.\n");
return FALSE;
}
-
+ RegisterResourceName(XvRTVideoNotify, "XvRTVideoNotify");
+
if (!(XvRTVideoNotifyList = CreateNewResourceType(XvdiDestroyVideoNotifyList)))
{
ErrorF("CreateResourceTypes: failed to allocate video notify list resource.\n");
return FALSE;
}
+ RegisterResourceName(XvRTVideoNotifyList, "XvRTVideoNotifyList");
if (!(XvRTPortNotify = CreateNewResourceType(XvdiDestroyPortNotify)))
{
ErrorF("CreateResourceTypes: failed to allocate port notify resource.\n");
return FALSE;
}
+ RegisterResourceName(XvRTPortNotify, "XvRTPortNotify");
return TRUE;
diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index c17a4b1c3..0a233b115 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -11,6 +11,7 @@
#include "os.h"
#include "dixstruct.h"
#include "resource.h"
+#include "registry.h"
#include "scrnintstr.h"
#include "extnsionst.h"
#include "servermd.h"
@@ -676,12 +677,15 @@ XvMCExtensionInit(void)
if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes)))
return;
+ RegisterResourceName(XvMCRTContext, "XvMCRTContext");
if(!(XvMCRTSurface = CreateNewResourceType(XvMCDestroySurfaceRes)))
return;
+ RegisterResourceName(XvMCRTSurface, "XvMCRTSurface");
if(!(XvMCRTSubpicture = CreateNewResourceType(XvMCDestroySubpictureRes)))
return;
+ RegisterResourceName(XvMCRTSubpicture, "XvMCRTSubpicture");
extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors,
ProcXvMCDispatch, SProcXvMCDispatch,