summaryrefslogtreecommitdiff
path: root/config/dbus.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-29config: drop the dbus APIPeter Hutterer1-407/+0
This API has been disabled by default since 1.4, the first release it came in. There a no known users of it and even its direct replacement (HAL) has been superseeded by udev on supported platforms since 1.8. This code is untested, probably hasn't been compiled in years and should not be shipped. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2012-03-21Introduce a consistent coding styleKeith Packard1-19/+19
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-08-22input: make InputOption opaque, provide interface functions.Peter Hutterer1-38/+14
InputOptions is not switched to use struct list for a future patch to unify it with the XF86OptionRec. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-08-22config: use add_option for '_source' tooPeter Hutterer1-9/+1
_source was being allocated manually, with all other options added to that list through add_option. Skip the manual part, allocate the first option _source with add_option too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-06-11Get rid of xstrdup when argument is definitely non-NULLMikhail Gusarov1-4/+4
Replace xstrdup with strdup when either constant string is being duplicated or argument is guarded by conditionals and obviously can't be NULL Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11config: remove redundant DBUS API define, require dbus-1 >= 1.0Peter Hutterer1-1/+0
It's still being pulled in by the HAL CFLAGS but the requirement to define this was dropped from DBus pre 1.0 (November 2006). This means we require dbus 1.0 now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-06Remove more superfluous if(p) checks around free(p)Mikhail Gusarov1-4/+2
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ -if(E) { free(E); } +free(E); Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-05-26Revert "Add a "flags" field to DeleteInputDeviceRequest."Keith Packard1-1/+1
Peter wants to get a larger patch sequence put together and I didn't read past the commit message to see the 'don't take this patch please'. This reverts commit 531ff40301975519af7b20109c17d296312d3f2b.
2010-05-25Add a "flags" field to DeleteInputDeviceRequest.Peter Hutterer1-1/+1
Some input drivers need to implement an internal hotplugging scheme for dependent devices to provide multiple X devices off one kernel device file. Such dependent devices can be added with NewInputDeviceRequest() but they are not removed when the config backend calls DeleteInputDeviceRequest(), leaving the original device to clean up. Example of the wacom driver: config/udev calls NewInputDeviceRequest("stylus") wacom PreInit calls NewInputDeviceRequest("eraser") NewInputDeviceRequest("pad") NewInputDeviceRequest("cursor") PreInit finishes. When the device is removed, the config backend only calls DeleteInputDeviceRequest for "stylus". The driver needs to call DeleteInputDeviceRequest for the dependent devices eraser, pad and cursor to clean up properly. However, when the server terminates, DeleteInputDeviceRequest is called for all devices - the driver must not remove the dependent devices to avoid double-frees. There is no method for the driver to detect why a device is being removed, leading to elaborate guesswork and some amount of wishful thinking. Though the input driver's UnInit already supports flags, they are unused. This patch uses the flags to supply information where the DeleteInputDeviceRequest request originates from, allowing a driver to selectively call DeleteInputDeviceRequest when necessary. Also bumps XINPUT ABI. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-5/+5
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-22config: Introduce InputAttributes in NewInputDeviceRequestDan Nicholson1-1/+1
In order to give NewInputDeviceRequest more information, a new InputAttributes type is introduced. Currently, this collects the product and vendor name, device path, and sets booleans for attributes such as having keys and/or a pointer. Only the HAL backend fills in the attributes, though. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-06-07config: fix build after XI2 API changes to RemoveDevice.Simon Thum1-1/+1
This patch fixes the build with --enable-config-dbus is enabled (default disabled). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-02-28XACE: Fix instances of DixUnknownAccess at hook callsites.Eamon Walsh1-1/+1
2008-01-29config: don't reset connection info on disconnect.Peter Hutterer1-3/+2
If dbus is restarted, we try to connect again and this is difficult if the busname and/or busobject is not set. (cherry picked from commit 210eeef495770c1883c842ff003c28ce25f279d4)
2007-11-14Merge branch 'master' into XACE-SELINUXEamon Walsh1-2/+2
Conflicts: Xext/xace.c Xext/xace.h
2007-11-06Config: D-Bus: Fix dbus_bus_request_name failure checkElvis Pranskevichus1-2/+2
The code in connect_hook incorrectly checks for dbus_bus_request_name failure. The dbus_bus_request_name error indicator is -1, not 0. This leads to subsequent assertion failure in libdbus.
2007-09-28xace: add new hooks + access controls: XInput extension.Eamon Walsh1-1/+1
Introduces new dix API to lookup a device, dixLookupDevice(), which replaces LookupDeviceIntRec and LookupDevice.
2007-08-31config: Use [config/dbus] consistently for error messages.Peter Hutterer1-4/+4
2007-08-31config: return BadValue to caller if add/remove doesn't have parameters.Peter Hutterer1-4/+6
If message iterator cannot be created, the caller didn't supply any parameters. Return BadValue, instead of dying a horrible death while being stuck in an endless loop.
2007-08-01Convert all my license statements to the standard formDaniel Stone1-17/+19
Convert all my license statements to the standard, accepted form: cf. <20070717142307.GD13478@fooishbar.org> http://lists.freedesktop.org/archives/xorg/2007-July/026451.html keithp's license on configure.ac changed with his verbal permission.
2007-08-01Hotplug: D-Bus: API version 2Daniel Stone1-10/+42
Use uint32s instead of int32s where practical, and add an API version request. Also, try to return all devices added, not just the first, and box device arguments.
2007-08-01Hotplug: Separate D-Bus into core and hotplug API componentsDaniel Stone1-0/+407
Break up D-Bus into two components: a D-Bus core that can be used by any part of the server (for the moment, just the D-Bus hotplug API, and the forthcoming HAL hotplug API), and the old D-Bus hotplug API.