diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-10-11 11:54:18 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-10-20 19:58:37 +0200 |
commit | 7c5023037815228280dcf461bf9b9f2b3575f600 (patch) | |
tree | 479835d38569553538356bca176222181d9671f5 /src/basic/macro.h | |
parent | Merge pull request #17286 from benzea/benzea/xdg-autostart-improvements (diff) | |
download | systemd-7c5023037815228280dcf461bf9b9f2b3575f600.tar.xz systemd-7c5023037815228280dcf461bf9b9f2b3575f600.zip |
resolvectl: break nta/domain/dns listings with newlines
We would print the whole string as a single super-long line. Let's nicely
break the text into lines that fit on the screen.
$ COLUMNS=70 build/resolvectl --no-pager nta
Global: home local intranet 23.172.in-addr.arpa lan
18.172.in-addr.arpa 16.172.in-addr.arpa 19.172.in-addr.arpa
25.172.in-addr.arpa 21.172.in-addr.arpa d.f.ip6.arpa
20.172.in-addr.arpa 30.172.in-addr.arpa 17.172.in-addr.arpa
internal 168.192.in-addr.arpa 28.172.in-addr.arpa
22.172.in-addr.arpa 24.172.in-addr.arpa 26.172.in-addr.arpa
corp 10.in-addr.arpa private 29.172.in-addr.arpa test
27.172.in-addr.arpa 31.172.in-addr.arpa
Link 2 (hub0):
Link 4 (enp0s31f6):
Link 5 (wlp4s0):
Link 7 (virbr0): adsfasdfasdfasd.com 21.172.in-addr.arpa lan j b
a.com home d.f.ip6.arpa b.com local 16.172.in-addr.arpa
19.172.in-addr.arpa 18.172.in-addr.arpa 25.172.in-addr.arpa
20.172.in-addr.arpa k i h 23.172.in-addr.arpa
168.192.in-addr.arpa d g intranet 17.172.in-addr.arpa c e.com
30.172.in-addr.arpa a f d.com e internal
Link 8 (virbr0-nic):
Link 9 (vnet0):
Link 10 (vb-rawhide):
Link 15 (wwp0s20f0u2i12):
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index 41c2c3289e..954bb2de2a 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -634,4 +634,6 @@ static inline int __coverity_check_and_return__(int condition) { _copy; \ }) +#define SIZE_ADD(x, y) ((x) >= SIZE_MAX - (y) ? SIZE_MAX : (x) + (y)) + #include "log.h" |