Systemd/src/udev
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
..
ata_id Add SPDX license identifiers to source files under the GPL 2017-11-19 19:08:15 +01:00
cdrom_id tree-wide: use "cannot" instead of "can not" 2018-02-08 10:34:52 +01:00
collect basic/macros: rename noreturn into _noreturn_ (#8456) 2018-03-15 14:23:46 +09:00
mtd_probe udev: some very trivial coding style updates 2017-12-25 11:48:21 +01:00
net macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
scsi_id udev: use startswith() instead of the combination of strneq() and strlen() (#8459) 2018-03-16 10:29:57 +01:00
v4l_id v4l_id: check mplane video capture and output capailities (#8464) 2018-03-20 09:54:18 +01:00
.vimrc import udev repository 2012-04-03 21:08:04 +02:00
generate-keyboard-keys-gperf.sh separate flags from shebang 2017-12-25 19:48:49 +01:00
generate-keyboard-keys-list.sh separate flags from shebang 2017-12-25 19:48:49 +01:00
meson.build meson: add a single .h file to shared libs with no sources 2018-01-03 12:09:46 +01:00
udev-builtin-blkid.c udevadm: prevent segfault in blkid builtin when offset not specified 2018-03-01 21:50:38 +08:00
udev-builtin-btrfs.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
udev-builtin-hwdb.c Fix format-truncation compile failure by typecasting USB IDs (#8250) 2018-02-22 19:41:30 +01:00
udev-builtin-input_id.c udev: don't assign INPUT_ID_MOUSE to a touchpad/joystick/touchscreen (#8259) 2018-02-23 09:36:45 +01:00
udev-builtin-keyboard.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
udev-builtin-kmod.c Add SPDX license identifiers to source files under the GPL 2017-11-19 19:08:15 +01:00
udev-builtin-net_id.c udev/net-id: Fix check for address to keep interface names stable (#8458) 2018-03-16 02:42:38 +09:00
udev-builtin-net_setup_link.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
udev-builtin-path_id.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
udev-builtin-uaccess.c Add SPDX license identifiers to source files under the GPL 2017-11-19 19:08:15 +01:00
udev-builtin-usb_id.c Add SPDX license identifiers to source files under the GPL 2017-11-19 19:08:15 +01:00
udev-builtin.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
udev-ctrl.c Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
udev-event.c process-util: add another fork_safe() flag for enabling LOG_ERR/LOG_WARN logging 2018-01-04 13:27:26 +01:00
udev-node.c tree-wide: use "cannot" instead of "can not" 2018-02-08 10:34:52 +01:00
udev-rules.c coccinelle: similar to reallocarray() let's also systematically use malloc_multiply() 2018-03-02 12:39:07 +01:00
udev-watch.c Add some handling to remaining unlinkat calls 2018-02-19 15:00:00 +01:00
udev.conf Add note to udev.conf that changes to that file require a rebuild of the initramfs 2018-02-27 18:56:19 -03:00
udev.h Add SPDX license identifiers to source files under the GPL 2017-11-19 19:08:15 +01:00
udev.pc.in tree-wide: standardize on $(PACKAGE_VERSION) for the version string 2017-04-04 20:36:09 -04:00
udevadm-control.c coccinelle: make use of DIV_ROUND_UP() wherever appropriate 2018-03-20 20:59:02 +01:00
udevadm-hwdb.c coccinelle: add reallocarray() coccinelle script 2018-03-02 12:39:07 +01:00
udevadm-info.c tree-wide: make use of new STRLEN() macro everywhere (#7639) 2017-12-14 19:02:29 +01:00
udevadm-monitor.c udevadm: getopt() and help message cleanup 2017-12-05 23:30:10 +09:00
udevadm-settle.c udevadm: getopt() and help message cleanup 2017-12-05 23:30:10 +09:00
udevadm-test-builtin.c udevadm: getopt() and help message cleanup 2017-12-05 23:30:10 +09:00
udevadm-test.c udevadm: getopt() and help message cleanup 2017-12-05 23:30:10 +09:00
udevadm-trigger.c udevadm: fix fd leak on oom 2018-02-15 11:49:40 +01:00
udevadm-util.c Add SPDX license identifiers to source files under the GPL 2017-11-19 19:08:15 +01:00
udevadm-util.h udevadm: getopt() and help message cleanup 2017-12-05 23:30:10 +09:00
udevadm.c Add SPDX license identifiers to source files under the GPL 2017-11-19 19:08:15 +01:00
udevd.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00