diff options
| author | Thomas Haller <thaller@redhat.com> | 2019-05-14 12:39:27 +0200 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2019-05-15 21:06:58 +0200 |
| commit | ee9f91e7071eb36b5cc7024072953ffda3fcad19 (patch) | |
| tree | 81133361239f02145d6a1ce8fabe6188cd49e189 /libnm | |
| parent | 37722a70ffbc494c68d9701d2abf58afe713cc06 (diff) | |
| download | NetworkManager-th/logging-syslog-facility.tar.gz | |
logging: use stack allocated string buffer to constuct NM_LOG_DOMAINS fieldth/logging-syslog-facility
NM_LOG_DOMAINS is a comma-separated list of the selected logging domains.
As the number of all logging domains is fixed at compile-time, the maximum
length of the buffer is known.
$ git grep $'^\t{ LOGD_' | sed 's/.*"\(.*\)" .*/\1/' | xargs | sed 's/ */,/g' | sed 's/^/NM_LOG_DOMAINS=/'
NM_LOG_DOMAINS=PLATFORM,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,AGENTS,SETTINGS,SUSPEND,CORE,DEVICE,OLPC,INFINIBAND,FIREWALL,ADSL,BOND,VLAN,BRIDGE,DBUS_PROPS,TEAM,CONCHECK,DCB,DISPATCH,AUDIT,SYSTEMD,VPN_PLUGIN,PROXY
Note that the static buffer "_all_logging_domains_to_str" is known
to be large enough to contain these domain names (it's even longer,
as it also contains "ALL", "IP", and "DHCP" alises). We can use that
to define the array of suitable size.
Diffstat (limited to 'libnm')
0 files changed, 0 insertions, 0 deletions
