Systemd/src/libsystemd
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
..
sd-bus core: simplify cg_[all_]unified() 2017-02-18 17:51:13 -05:00
sd-daemon Add sd_is_socket_sockaddr (#4885) 2016-12-14 11:51:26 +01:00
sd-device tree-wide: adjust fall through comments so that gcc is happy 2017-01-31 14:04:55 -05:00
sd-event sd-event: "when exiting no signal event are pending" is a wrong assertion (#5271) 2017-02-08 20:56:22 +01:00
sd-hwdb sd-hwdb: drop caching of search string 2016-11-30 15:51:08 -05:00
sd-id128 core: store the invocation ID in the per-service keyring 2016-12-13 20:59:36 +01:00
sd-login tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
sd-netlink networkd: handle MTU field in IPv6 RA (#4719) 2016-11-23 22:32:19 +01:00
sd-network tree-wide: make invocations of extract_first_word more uniform (#4627) 2016-11-11 18:58:41 +01:00
sd-path tree-wide: drop NULL sentinel from strjoin 2016-10-23 11:43:27 -04:00
sd-resolve sd-resolve: use close_many() (#3643) 2016-07-02 08:17:26 -07:00
sd-utf8 tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
.gitignore libsystemd: remove list of symbols to export only in the future 2015-06-17 16:21:13 +02:00
libsystemd.pc.in Adjust pkgconfig files to point at rootlibdir (#4584) 2016-11-08 09:36:41 +01:00
libsystemd.sym Add sd_is_socket_sockaddr (#4885) 2016-12-14 11:51:26 +01:00
Makefile libsystemd-bus: rename to libsystemd 2014-01-13 18:54:19 +01:00