Systemd/src/nspawn
Lennart Poettering ae2a15bc14 macro: introduce TAKE_PTR() macro
This macro will read a pointer of any type, return it, and set the
pointer to NULL. This is useful as an explicit concept of passing
ownership of a memory area between pointers.

This takes inspiration from Rust:

https://doc.rust-lang.org/std/option/enum.Option.html#method.take

and was suggested by Alan Jenkins (@sourcejedi).

It drops ~160 lines of code from our codebase, which makes me like it.
Also, I think it clarifies passing of ownership, and thus helps
readability a bit (at least for the initiated who know the new macro)
2018-03-22 20:21:42 +01:00
..
meson.build Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
nspawn-cgroup.c nspawn: when in hybrid mode, chown() both the legacy and the unified hierarchy to the root in the container 2017-12-05 13:49:13 +01:00
nspawn-cgroup.h nspawn: when in hybrid mode, chown() both the legacy and the unified hierarchy to the root in the container 2017-12-05 13:49:13 +01:00
nspawn-def.h build-sys: make the dynamic UID range, and the container UID range configurable 2017-12-06 12:55:37 +01:00
nspawn-expose-ports.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-expose-ports.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-gperf.gperf tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
nspawn-mount.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
nspawn-mount.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-network.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-network.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-patch-uid.c tree-wide: make use of new STRLEN() macro everywhere (#7639) 2017-12-14 19:02:29 +01:00
nspawn-patch-uid.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-register.c When mangling names, optionally emit a warning (#8400) 2018-03-21 15:26:47 +01:00
nspawn-register.h nspawn: make use of the RequestStop logic of scope units 2017-11-23 21:47:48 +01:00
nspawn-seccomp.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-seccomp.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-settings.c Replace free and reassignment with free_and_replace 2017-11-24 10:33:41 +00:00
nspawn-settings.h log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
nspawn-setuid.c tree-wide: port various places over to use new rearrange_stdio() 2018-03-02 11:42:10 +01:00
nspawn-setuid.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-stub-pid1.c tree-wide: introduce new safe_fork() helper and port everything over 2017-12-25 11:48:21 +01:00
nspawn-stub-pid1.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
test-patch-uid.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00