summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-09Xv: Remove excessive module-induced indirectionTomas Carnecky9-40/+12
Xv used to call XvScreenInit and co. through function pointers, as XvScreenInit may have been sitting on the other side of a module boundary from xf86XvScreenInit. Why this was so is a mystery, but make it not so any more. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09XFree86: sdksyms: Remove unused -DXorgLoaderDaniel Stone1-2/+2
We no longer have anything in the tree that checks for XorgLoader. This was a fairly monumental hack: xvdi.h used to hide all its functions behind #ifndef XorgLoader, solely to avoid sdksyms.sh picking up its symbols, as it was previously a module rather than built-in. This is no longer the case, so we can remove the define. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Move Xv and XvMC from extmod to built-inTomas Carnecky16-84/+34
Always build these extensions into the core server, rather than letting them languish in extmod. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Move XRes from extmod to built-inTomas Carnecky5-10/+7
Always build XRes support into the core server, rather than letting it languish in extmod. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Move DPMS from extmod to built-inTomas Carnecky4-10/+5
Always build DPMS support into the core server, rather than letting it languish in extmod. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Move MIT-SCREEN-SAVER from extmod to built-inTomas Carnecky4-10/+5
If we've built MIT-SCREEN-SAVER support, then just build it into the main binary, rather than leaving it in extmod. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Move RECORD from external module to built-inTomas Carnecky7-57/+7
Rather than languishing in its own special module, move RECORD into the core server. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Move DBE from an external module to built-inTomas Carnecky8-62/+10
If DBE support is compiled in the server, just man up and build it into the server, rather than having it as an external module. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09miinitext: Use ARRAY_SIZE rather than sentinelDaniel Stone1-5/+5
NULL sentinels are totally lame. v2: numExtensionModules isn't public, so keep using the provided sentinal - Keith Packard <keithp@keithp.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Stéphane Marchesin <stephane.marchesin@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09extmod: Use ARRAY_SIZE rather than sentinelDaniel Stone1-7/+1
When the array gets down to size zero (which it does in later patches), gcc complains that the index is out of bounds. Avoid this by using ARRAY_SIZE on extensionModules instead. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Stéphane Marchesin <stephane.marchesin@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Add xf86ExtensionInit for DDX extension configurationDaniel Stone5-15/+88
xf86ExtensionInit is called after configuration file parsing, so it can perform the two parts of extension initialisation currently done by extmod: enabling and disabling of extensions through an 'omit' option, and SELinux configuration. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Loader: Drop EXTERN_MODULE flagDaniel Stone3-16/+0
EXTERN_MODULE was used to specify that we shouldn't worry about modules lacking a ModuleData object. It was also completely unused. *shrug* Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Move extension initialisation prototypes into extinit.hDaniel Stone65-274/+264
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to hold all our extension initialisation prototypes, rather than duplicating them everywhere. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09GLX: Insert swrast provider from GlxExtensionInitDaniel Stone5-21/+8
Rather than making poor old miinitext.c do it, including making DMX have fake symbols just to keep it happy. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Stéphane Marchesin <stephane.marchesin@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Reorder extension initialisation for non-XorgDaniel Stone1-53/+75
Reorder static extension initialisation in miinitext for non-Xorg servers to match Xorg's order. Tested with Xephyr; checked that the extension list was identical before and after. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Replace INITARGS with voidTomas Carnecky16-84/+65
INITARGS was a hardcoded define to void. Since knowing the function signature for your extensions is kinda useful, just replace it with a hardcoded void, but leave the define there for API compatibility. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Xinerama: Fix ExtensionInit prototypeDaniel Stone2-2/+2
Huh, so I guess INITARGS used to be int argc, char *argv then. Either way, it's now void, so fix that ... Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Make extension.h self-contained, remove C++ externsDaniel Stone1-2/+3
externsion.h required bits from Xfuncproto.h and dixstruct.h, but included neither; fix that. It also had _XFUNCPROTOBEGIN and _XFUNCPROTOEND wrappers, which is a bit pointless for a server-only library, as it's only needed for C++. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Add a common ARRAY_SIZE macro to dix.hDaniel Stone3-4/+2
Does what it says on the box, replacing those from Xi/ and glx/. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Xorg: Link XKB DDX library after core server libsDaniel Stone1-1/+1
libxorgxkb.a contains a number of libraries which are used by XKB action code to call back into the DDX, e.g. for VT switching, termination, grab breaking, et al. Make sure libxkb.a comes first in the link order, so it can mark XkbDDX* as used in order for the linker to not discard them. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Don't make failure to -nolisten fatalDaniel Stone1-2/+2
If failing to disable a protocol specified by -nolisten failed, we'd throw a FatalError and bomb startup entirely. From poking at xtrans, it looks like the only way we can get a failure here is because we've specified a protocol name which doesn't exist, which probably doesn't constitute a security risk. And it makes it possible to start gdm even though you've built with --disable-tcp-transport. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Xext: Add hashtable.h to sources to fix distcheckDaniel Stone1-1/+1
Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Replace padlength tables with inline functions from misc.hAlan Coopersmith5-13/+50
Adds new function padding_for_int32() and uses existing pad_to_int32() depending on required results. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09ephyrGLXQueryServerString: Stop making an unused copy of server_stringAlan Coopersmith1-11/+1
ephyrGLXQueryServerString() carefully allocated a buffer padded to the word-aligned string length for sending to the client, copied the string to it, and then forgot to use it, potentially reading a few bytes of garbage past the end of the server_string buffer. Since WriteToClient already handles the necessary padding, just send it the actual length of the original server_string, and don't bother making a padded copy. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Initialize padding bits to 0 in ErrorConnMax()Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Set padding bytes to 0 in WriteToClientAlan Coopersmith1-1/+5
Clear them out when needed instead of leaving whatever values were present in previously sent messages. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in dix registryAlan Coopersmith1-3/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in extension EventsAlan Coopersmith23-319/+321
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in dix EventsAlan Coopersmith10-206/+204
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in xf86 extension RepliesAlan Coopersmith4-261/+302
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in Xephyr RepliesAlan Coopersmith2-84/+99
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in dmx RepliesAlan Coopersmith4-161/+216
v2: fix in __glXGetVisualConfigs to not re-declare local 'reply' variable Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org> Fixup for Use C99 designated initializeres in dmx Replies Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09Use C99 designated initializers in randr RepliesAlan Coopersmith7-159/+204
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in xkb RepliesAlan Coopersmith1-160/+164
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in glx RepliesAlan Coopersmith3-55/+75
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in various extension RepliesAlan Coopersmith7-59/+73
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in Xinput RepliesAlan Coopersmith28-174/+226
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in Xext RepliesAlan Coopersmith17-378/+471
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in dix RepliesAlan Coopersmith7-220/+265
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use C99 designated initializers in SendErrorToClientAlan Coopersmith1-8/+7
Let the compiler worry about 0-filling the rest of the fields, instead of memsetting the whole struct and then going back to overwrite some of the fields. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use calloc to zero fill buffers being allocated for replies & eventsAlan Coopersmith9-13/+15
Ensures padding bytes are zero-filled Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09xf86dga2.c & xf86vmode.c: Move REQUEST_SIZE_MATCH checks before using stuffAlan Coopersmith2-41/+52
Seems silly waiting to check if the client failed to send us enough bytes until after we've already tried using them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09ProcRRListOutputProperties: skip atom walk if the list is emptyAlan Coopersmith1-5/+7
pAtoms is only allocated if numProps was non-zero, so move the walk through the property list to copy atoms to it inside the if (numProps) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09ProcRRGetScreenInfo: swap configTimestamp as wellAlan Coopersmith1-0/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Bug 51375: Xorg doesn't set status for RRGetOutputInfoJaroslav Šmíd1-0/+1
https://bugs.freedesktop.org/show_bug.cgi?id=51375 https://bugs.freedesktop.org/attachment.cgi?id=63397 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Use temporary variables instead of parts of reply structuresAlan Coopersmith10-48/+77
When passing variable pointers to functions or otherwise doing long sequences to compute values for replies, create & use some new temporary variables, to allow for simpler initialization of reply structures in the following patches. Move memsets & other initializations to group with the rest of the filling in of the reply structure, now that they're not needed so early in the code path. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09ProcQueryKeymap: rework logic around permission to copy key statesAlan Coopersmith1-7/+9
Always initialize to zero, and then if permission is granted, copy the current key state maps, instead of always copying and then zeroing out if permission was denied. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Core events: invert check for permission to copy key statesAlan Coopersmith1-8/+10
Always initialize to zero, and then if permission is granted, copy the current key state maps. Use memcpy instead of memmove for the copy, since we're always copying to a newly allocated event on the stack, so guaranteed not to overlap with the device map structure. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Rework reply initialization in ProcGetProperty & NullPropertyReplyAlan Coopersmith1-13/+18
Don't need to pass an empty reply to NullPropertyReply, let it make it's own. Move reply initialization code in remaining replies in ProcGetProperty to group with the rest of the fields. (Prepares for coming C99 designated initializer conversion.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09Fix more poorly indented/wrapped comments & codeAlan Coopersmith11-30/+44
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>