Systemd/src/login
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
..
70-power-switch.rules Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
70-uaccess.rules rules: add a missing comma in 70-uaccess.rules since it improves readability 2018-02-27 14:37:01 +01:00
71-seat.rules.in Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
73-seat-late.rules.m4 login/meson.build: require ACL for uaccess rules 2018-01-27 10:55:32 +01:00
inhibit.c tree-wide: reopen log when we need to log in FORK_CLOSE_ALL_FDS children 2018-02-22 00:35:00 +01:00
loginctl.c bus-util: introduce bus_message_print_all_properties() 2018-03-20 00:44:37 +09:00
logind-acl.c tree-wide: use path_hash_ops instead of string_hash_ops whenever we key by a path 2018-02-12 11:07:55 +01:00
logind-acl.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-action.c Introduce suspend-to-hibernate (#8274) 2018-03-08 14:17:33 +01:00
logind-action.h Introduce suspend-to-hibernate (#8274) 2018-03-08 14:17:33 +01:00
logind-button.c Suspend on lid close based on power status. (#8016) 2018-02-09 17:37:39 +01:00
logind-button.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-core.c logind: trivial improvements 2018-02-26 18:31:06 +01:00
logind-dbus.c Introduce suspend-to-hibernate (#8274) 2018-03-08 14:17:33 +01:00
logind-device.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-device.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-gperf.gperf Suspend on lid close based on power status. (#8016) 2018-02-09 17:37:39 +01:00
logind-inhibit.c coccinelle: O_NDELAY → O_NONBLOCK 2018-01-24 11:09:29 +01:00
logind-inhibit.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-seat-dbus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-seat.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
logind-seat.h logind: change check_gc to may_gc everywhere 2018-02-15 14:09:40 +01:00
logind-session-dbus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind-session-device.c login: effectively revert "open device if needed" 2018-03-10 10:47:18 +00:00
logind-session-device.h logind: let's pack a few struct fields we can pack 2018-02-26 18:39:32 +01:00
logind-session.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
logind-session.h logind: change check_gc to may_gc everywhere 2018-02-15 14:09:40 +01:00
logind-user-dbus.c logind: fix user_object_find() 2018-01-05 13:59:12 +01:00
logind-user.c logind: change check_gc to may_gc everywhere 2018-02-15 14:09:40 +01:00
logind-user.h logind: change check_gc to may_gc everywhere 2018-02-15 14:09:40 +01:00
logind-utmp.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
logind.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
logind.conf.in Suspend on lid close based on power status. (#8016) 2018-02-09 17:37:39 +01:00
logind.h Suspend on lid close based on power status. (#8016) 2018-02-09 17:37:39 +01:00
meson.build meson: drop unnecessary "transformation" of policy files 2018-02-16 13:01:12 +01:00
org.freedesktop.login1.conf Introduce suspend-to-hibernate (#8274) 2018-03-08 14:17:33 +01:00
org.freedesktop.login1.policy meson: drop unnecessary "transformation" of policy files 2018-02-16 13:01:12 +01:00
org.freedesktop.login1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
pam_systemd.c sd-bus: drop references to legacy /var/run D-Bus socket 2018-01-05 13:58:32 +01:00
pam_systemd.sym Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
sysfs-show.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
sysfs-show.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
systemd-user.m4 pam: include pam_keyinit.so in our PAM fragments 2016-12-13 20:59:36 +01:00
test-inhibit.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-login-shared.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-login-tables.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00