Systemd/src/network
Lennart Poettering 0d53667334 tree-wide: use __fsetlocking() instead of fxyz_unlocked()
Let's replace usage of fputc_unlocked() and friends by __fsetlocking(f,
FSETLOCKING_BYCALLER). This turns off locking for the entire FILE*,
instead of doing individual per-call decision whether to use normal
calls or _unlocked() calls.

This has various benefits:

1. It's easier to read and easier not to forget

2. It's more comprehensive, as fprintf() and friends are covered too
   (as these functions have no _unlocked() counterpart)

3. Philosophically, it's a bit more correct, because it's more a
   property of the file handle really whether we ever pass it on to another
   thread, not of the operations we then apply to it.

This patch reworks all pieces of codes that so far used fxyz_unlocked()
calls to use __fsetlocking() instead. It also reworks all places that
use open_memstream(), i.e. use stdio FILE* for string manipulations.

Note that this in some way a revert of 4b61c87511.
2017-12-14 10:42:25 +01:00
..
netdev networkd: introduce vxcan netdev. (#7150) 2017-11-22 08:23:22 +01:00
wait-online Add a "RequiredForOnline=" Link attribute for .network files (#7347) 2017-11-30 18:03:50 +01:00
meson.build Add test-routing-policy-rule 2017-11-28 09:25:38 +01:00
networkctl.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address-label.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address-label.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address-pool.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address-pool.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-address.c networkd: Free Prefix in case allocation fails (#7480) 2017-11-27 13:07:22 +01:00
networkd-address.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-brvlan.c *: fix some inconsistent control statement style 2017-12-01 16:49:52 -08:00
networkd-brvlan.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-conf.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-conf.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-dhcp4.c networkd/dhcp: shorten overlong hostname (#7616) 2017-12-13 18:00:46 +01:00
networkd-dhcp6.c tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
networkd-fdb.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-fdb.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-gperf.gperf tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
networkd-ipv4ll.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-ipv6-proxy-ndp.c networkd: don't try to configure IPv6 proxy NDP if IPv6 is not available (#7613) 2017-12-13 13:47:10 +09:00
networkd-ipv6-proxy-ndp.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-link-bus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-link.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
networkd-link.h networkd: Fix race condition in [RoutingPolicyRule] handling (#7615) 2017-12-12 16:25:36 +01:00
networkd-lldp-tx.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-lldp-tx.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-manager-bus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-manager.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
networkd-manager.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-ndisc.c Merge pull request #6910 from ssahani/issue-6359 2017-11-20 19:21:36 +01:00
networkd-ndisc.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-network-bus.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-network-gperf.gperf networkd: RouteTable option in [IPv6AcceptRA] is now properly processed (#7633) 2017-12-14 14:11:03 +09:00
networkd-network.c Add a "RequiredForOnline=" Link attribute for .network files (#7347) 2017-11-30 18:03:50 +01:00
networkd-network.h Add a "RequiredForOnline=" Link attribute for .network files (#7347) 2017-11-30 18:03:50 +01:00
networkd-radv.c networkd: Ignore DNS information when uplink is not managed (#7571) 2017-12-08 13:33:40 +01:00
networkd-radv.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-route.c networkd: fix reversed arguments 2017-11-28 09:25:38 +01:00
networkd-route.h networkd: fix reversed arguments 2017-11-28 09:25:38 +01:00
networkd-routing-policy-rule.c networkd: Fix race condition in [RoutingPolicyRule] handling (#7615) 2017-12-12 16:25:36 +01:00
networkd-routing-policy-rule.h networkd: move rule loading to a separate function 2017-11-28 09:25:38 +01:00
networkd-util.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd-util.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
networkd.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
org.freedesktop.network1.conf networkd: add basic dbus API 2015-02-05 11:50:34 +01:00
org.freedesktop.network1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
systemd-networkd.pkla networkd: allow networkd to set the timezone in timedated 2016-11-23 16:32:06 +01:00
systemd-networkd.rules networkd: allow networkd to set the timezone in timedated 2016-11-23 16:32:06 +01:00
test-network-tables.c networkd: clean up main header file a bit 2016-11-14 01:05:06 +01:00
test-network.c networkd/dhcp: shorten overlong hostname (#7616) 2017-12-13 18:00:46 +01:00
test-networkd-conf.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-routing-policy-rule.c networkd: fix memleak of Rules 2017-11-28 21:34:50 +01:00