Systemd/src/libsystemd/sd-bus
Tejun Heo 415fc41cea core: simplify cg_[all_]unified()
cg_[all_]unified() test whether a specific controller or all controllers are on
the unified hierarchy.  While what's being asked is a simple binary question,
the callers must assume that the functions may fail any time, which
unnecessarily complicates their usages.  This complication is unnecessary.
Internally, the test result is cached anyway and there are only a few places
where the test actually needs to be performed.

This patch simplifies cg_[all_]unified().

* cg_[all_]unified() are updated to return bool.  If the result can't be
  decided, assertion failure is triggered.  Error handlings from their callers
  are dropped.

* cg_unified_flush() is updated to calculate the new result synchrnously and
  return whether it succeeded or not.  Places which need to flush the test
  result are updated to test for failure.  This ensures that all the following
  cg_[all_]unified() tests succeed.

* Places which expected possible cg_[all_]unified() failures are updated to
  call and test cg_unified_flush() before calling cg_[all_]unified().  This
  includes functions used while setting up mounts during boot and
  manager_setup_cgroup().
2017-02-18 17:51:13 -05:00
..
bus-bloom.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-bloom.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-common-errors.c manager: refuse reloading/reexecing when /run is overly full 2017-02-06 16:58:06 +01:00
bus-common-errors.h manager: refuse reloading/reexecing when /run is overly full 2017-02-06 16:58:06 +01:00
bus-container.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-container.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-control.c tree-wide: drop (llu) casts for kernel's __u64 2016-11-07 22:49:10 -05:00
bus-control.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-convenience.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-creds.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
bus-creds.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-dump.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
bus-dump.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-error.c Merge pull request #653 from dvdhrm/bus-gold 2016-10-13 12:25:56 -04:00
bus-error.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-gvariant.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-gvariant.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-internal.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-internal.h sd-bus: bump message queue size 2016-08-31 20:09:31 +02:00
bus-introspect.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-introspect.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-kernel.c tree-wide: drop (llu) casts for kernel's __u64 2016-11-07 22:49:10 -05:00
bus-kernel.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-match.c sd-bus: Fix a read after free error in bus-match. (#3624) (#3625) 2016-06-29 22:22:12 +02:00
bus-match.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-message.c treewide: fix typos and remove accidental repetition of words 2016-07-11 16:18:43 +02:00
bus-message.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-objects.c tree-wide: minor formatting inconsistency cleanups 2016-02-23 14:20:34 -08:00
bus-objects.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-protocol.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-signature.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-signature.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-slot.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
bus-slot.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-socket.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
bus-socket.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-track.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
bus-track.h sd-bus: when the server-side disconnects, make sure to dispatch all tracking objects immediately 2016-08-22 17:31:36 +02:00
bus-type.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-type.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
busctl-introspect.c busctl introspect: use free_and_replace() 2016-11-09 16:39:16 +02:00
busctl-introspect.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
busctl.c tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
DIFFERENCES Revert "Revert "sd-bus: change serialization of kdbus messages to qualify in their entirety as gvariant objects"" 2015-02-16 15:03:44 +01:00
GVARIANT-SERIALIZATION Remove repeated 'the's 2015-07-07 07:40:53 -04:00
kdbus.h sd-bus: support matching on destination names 2015-07-06 17:45:33 +02:00
Makefile
PORTING-DBUS1 sd-bus: sync with kdbus upstream (ABI break) 2014-11-13 20:41:52 +01:00
sd-bus.c tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
test-bus-benchmark.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-chat.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
test-bus-cleanup.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-creds.c core: simplify cg_[all_]unified() 2017-02-18 17:51:13 -05:00
test-bus-error.c tree-wide: make ++/-- usage consistent WRT spacing 2016-02-22 20:32:04 -08:00
test-bus-gvariant.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-introspect.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-kernel-bloom.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-kernel.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-marshal.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-match.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-objects.c tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
test-bus-server.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-signature.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bus-track.c sd-bus: add a small test case for sd_bus_track 2016-08-22 17:31:36 +02:00
test-bus-zero-copy.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00