summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* sd-bus: add support for matches against arrays of strings in messagesLennart Poettering2014-11-28
|
* sd-bus: if a NULL signatures is passed to sd_bus_message_skip(), make it ↵Lennart Poettering2014-11-28
| | | | skip a single element of any type
* sd-bus: add arrays of strings in the bloom filterLennart Poettering2014-11-28
| | | | | | Let's do this right from the beginning, to prepare ground for udev messages that most likely want to store list of strings (for device tags) in messages, and filter on them.
* sd-bus: make more connection properties readableLennart Poettering2014-11-28
|
* sd-bus: add new sd_bus_get_address() for querying the current bus addressLennart Poettering2014-11-28
| | | | Also, update "busctl" to show this in its output.
* sd-bus: rename sd_bus_get_owner_id() → sd_bus_get_bus_id()Lennart Poettering2014-11-28
| | | | | | | The ID returned really doesn't identify the owner, but the bus instance, hence fix this misnaming. Also, update "busctl status" to show the ID in its output.
* treewide: another round of simplificationsMichal Schmidt2014-11-28
| | | | | Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-28
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* core: fix return value in error path after sd_event_add_io() failureMichal Schmidt2014-11-28
| | | | | | sd_event_add_io() does not set errno, it returns negative errno. Noticed during log_*_errno conversions.
* treewide: a few more log_*_errno + return simplificationsMichal Schmidt2014-11-28
| | | | The one in tmpfiles.c:create_item() even looks like it fixes a bug.
* treewide: yet more log_*_errno + return simplificationsMichal Schmidt2014-11-28
| | | | | | | | | | | | | Using: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg; print;' $f done And a couple of manual whitespace fixups.
* Revert "systemctl: append default suffix only if none present"Zbigniew Jędrzejewski-Szmek2014-11-28
| | | | | | This reverts a chunk out of commit 5e03c6e3b517286bbd65b48d88f60e5b83721894 which was trying to pass NULL to the the '.service' default. Anyway, it seems better to be explicit.
* treewide: more log_*_errno + return simplificationsMichal Schmidt2014-11-28
|
* systemctl: append default suffix only if none presentZbigniew Jędrzejewski-Szmek2014-11-28
| | | | | | | | Simplify unit_name_mangle() and unit_name_mangle_with_suffix() to always behave the same, and only append a suffix if there is no type suffix. If a user says 'isolate blah.device' it is better to return an error that the type cannot be isolated, than to try to isolate blah.device.target.
* udevd: don't set receive buffer size when socket activatedTom Gundersen2014-11-28
| | | | The socket unit does this, so no need to redo it in udevd.
* treewide: simplify log_*_errno(r,...) immediately followed by "return r"Michal Schmidt2014-11-28
|
* treewide: more log_*_errno() conversions, multiline callsMichal Schmidt2014-11-28
| | | | | | | | | | | | Basically: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \ $f; done Plus manual indentation fixups.
* hostnamectl: Exit with zero on successMartin Pitt2014-11-28
| | | | | | In show_all_names(), bus_map_all_properties() returns 1 on success which is then used as the return code of show_all_names() and eventually main(). Exit with zero in main() on all nonnegative results to guard against similar errors.
* udev,update-done: more log_xyz_errno() conversionsLennart Poettering2014-11-28
|
* sd-bus: make sure %m resolves to the specified error in bus_error_set_errnofv()Lennart Poettering2014-11-28
|
* bus-proxy: automatically detect scope of bus and derive which XML snippets ↵Lennart Poettering2014-11-28
| | | | to load from that
* sd-bus: rename default bus address constants, they aren't "paths" but ↵Lennart Poettering2014-11-28
| | | | "addresses"
* sd-bus: add new call sd_bus_get_scope() for querying whether one is ↵Lennart Poettering2014-11-28
| | | | connected to a system or a user bus
* sd-bus: rework credential query logicLennart Poettering2014-11-28
| | | | Also, make the call to free kdbus slices generic and use it everywhere
* treewide: more log_*_errno() conversionsMichal Schmidt2014-11-28
|
* treewide: drop unnecessary trailing \n in log_*() callsMichal Schmidt2014-11-28
|
* core: two more log_unit_*_errno() conversionsMichal Schmidt2014-11-28
|
* core: convert log_unit_*() to log_unit_*_errno()Michal Schmidt2014-11-28
| | | | | | Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_unit_(debug|info|notice|warning|error|emergency)\(([^"]+), "(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_unit_\1_errno(\2, \5, "\3%m"\4);/'
* core: add log_unit_*_errno() macrosMichal Schmidt2014-11-28
|
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-28
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-28
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* shared: fix log_emergency_errno macroMichal Schmidt2014-11-28
| | | | It was not passing the error argument.
* kdbus: when running in a container, don't complain that we cannot write to /sysLennart Poettering2014-11-28
|
* log: change log_xyz_errno() calls to always return the negative errorLennart Poettering2014-11-28
| | | | | | | | | | | | | | | | This enables us to write things like this: int open_some_file(void) { fd = open("/dev/foobar", O_RDWR|O_CLOEXEC); if (fd < 0) return log_error_errno(errno, "Failed to reboot: %m"); return fd; } Which is function that returns -errno on failure, as well as printing an error message, all in one line.
* log: make socket address structs static constLennart Poettering2014-11-28
|
* log: also set errno to the passed error code before processing format string ↵Lennart Poettering2014-11-28
| | | | | | in log_struct() That way the caller may use %m to print the specified error.
* core: only override kdbus attach mask when running as PID 1Lennart Poettering2014-11-28
|
* sd-bus: the attach_mask kernel module parameter is 64bit now, hence ↵Lennart Poettering2014-11-28
| | | | initialize it as such
* log: allow negative errno valuesLennart Poettering2014-11-28
| | | | | sd_bus_error_set_errno() allows negative errors too, hence, be equally nice.
* log: fix order of log_unit_struct() to match other logging callsLennart Poettering2014-11-28
| | | | | Also, while we are at it, introduce some syntactic sugar for creating ERRNO= and MESSAGE= structured logging fields.
* networkd: update logging macros for parameter order, and errno, to match ↵Lennart Poettering2014-11-28
| | | | rest of the code
* networkd: remove duplicate macro definitionsLennart Poettering2014-11-28
|
* sysv-generator: advertise the man pageZbigniew Jędrzejewski-Szmek2014-11-27
|
* fix build with --enable-terminalThomas Hindoe Paaboel Andersen2014-11-27
| | | | Broke with 086891e5c119abb9854237fc32e736fe2d67234c
* kmod-setup: simplify kernel command line parsingLennart Poettering2014-11-27
|
* kdbus: set kernel attach mask before creating the first busLennart Poettering2014-11-27
|
* selinux: log selinux log messages with LOG_AUTH facilityLennart Poettering2014-11-27
|
* log: rearrange log function namingLennart Poettering2014-11-27
| | | | | | | | | | - Rename log_meta() → log_internal(), to follow naming scheme of most other log functions that are usually invoked through macros, but never directly. - Rename log_info_object() to log_object_info(), simply because the object should be before any other parameters, to follow OO-style programming style.
* log: be a bit less wasteful when allocating buffersLennart Poettering2014-11-27
|
* log: add an "error" parameter to all low-level logging calls and intrdouce ↵Lennart Poettering2014-11-27
| | | | | | | | | | | | | | | | | | | | log_error_errno() as log calls that take error numbers This change has two benefits: - The format string %m will now resolve to the specified error (or to errno if the specified error is 0. This allows getting rid of a ton of strerror() invocations, a function that is not thread-safe. - The specified error can be passed to the journal in the ERRNO= field. Now of course, we just need somebody to convert all cases of this: log_error("Something happened: %s", strerror(-r)); into thus: log_error_errno(-r, "Something happened: %m");