summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-error.c
AgeCommit message (Collapse)Author
2016-05-25stuffLuke Shumaker
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2016-01-18test-bus-error: add tests for setting error == 0Zbigniew Jędrzejewski-Szmek
2016-01-18bus-error: verify additional error maps during installationZbigniew Jędrzejewski-Szmek
Go over the entries in the map and check that they make sense. Tests are added. In the future we might want to do additional checks, e.g. verifying that the error names are in the expected format.
2015-11-27tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easyLennart Poettering
GLIB has recently started to officially support the gcc cleanup attribute in its public API, hence let's do the same for our APIs. With this patch we'll define an xyz_unrefp() call for each public xyz_unref() call, to make it easy to use inside a __attribute__((cleanup())) expression. Then, all code is ported over to make use of this. The new calls are also documented in the man pages, with examples how to use them (well, I only added docs where the _unref() call itself already had docs, and the examples, only cover sd_bus_unrefp() and sd_event_unrefp()). This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we tend to call our destructors these days. Note that this defines no public macro that wraps gcc's attribute and makes it easier to use. While I think it's our duty in the library to make our stuff easy to use, I figure it's not our duty to make gcc's own features easy to use on its own. Most likely, client code which wants to make use of this should define its own: #define _cleanup_(function) __attribute__((cleanup(function))) Or similar, to make the gcc feature easier to use. Making this logic public has the benefit that we can remove three header files whose only purpose was to define these functions internally. See #2008.
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen
Sort the includes accoding to the new coding style.
2015-08-27Revert "sd-bus: do not connect to dbus-1 socket when kdbus is available"David Herrmann
This reverts commit d4d00020d6ad855d65d31020fefa5003e1bb477f. The idea of the commit is broken and needs to be reworked. We really cannot reduce the bus-addresses to a single address. We always will have systemd with native clients and legacy clients at the same time, so we also need both addresses at the same time.
2015-08-11 sd-bus: do not connect to dbus-1 socket when kdbus is availableKay Sievers
We should not fall back to dbus-1 and connect to the proxy when kdbus returns an error that indicates that kdbus is running but just does not accept new connections because of quota limits or something similar. Using is_kdbus_available() in libsystemd/ requires it to move from shared/ to libsystemd/. Based on a patch from David Herrmann: https://github.com/systemd/systemd/pull/886
2015-03-13tree-wide: there is no ENOTSUP on linuxDavid Herrmann
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
2014-12-10sd-bus: move common errors src/shared/bus-errors.h → ↵Lennart Poettering
src/libsystemd/sd-bus/bus-common-errors.h Stuff in src/shared/ should not use stuff from src/libsystemd/ really.
2014-12-08sd-bus: rework ELF error mapping table magicLennart Poettering
The ELF magic cannot work for consumers of our shard library, since they are in a different module. Hence make all the ELF magic private, and instead introduce a public function to register additional static mapping table.
2014-10-31Make bus errno mappings non-staticZbigniew Jędrzejewski-Szmek
__attribute__((used)) is not enough to force static variables to be carried over to a compiled program from a library. Mappings defined in libsystemd-shared.a were not visible in the compiled binaries. To ensure that the mappings are present in the final binary, the tables are made non-static and are given a real unique name by which they can be referenced. To use a mapping defined not in the local compilation unit (e.g. in a library) a reference to the mapping table is added. This is done by including a declaration in the header file. Expected values in test-engine are fixed to reflect the new mappings.
2014-10-31bus: do not segfault on zeros in errno mapping tableZbigniew Jędrzejewski-Szmek
Depending on the link order, holes might appear in the body of the sd_bus_errnomap section. Ignore them. Adds a simple test to print the table to help with debugging such issues in the future.
2014-10-30bus: add sd_bus_errnomap sectionZbigniew Jędrzejewski-Szmek
This allows custom "name" ↔ errno mappings to be registered. Tables from all compilation units are concatenated.
2014-01-21libsystemd: split up into subdirsTom Gundersen
We still only produce on .so, but let's keep the sources separate to make things a bit less messy.