aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJulian Wiedmann <[email protected]>2019-12-18 17:34:44 +0100
committerDavid S. Miller <[email protected]>2019-12-18 12:34:56 -0800
commite6b1b7da247b329bb9e62adc97ef28678199cf35 (patch)
tree3c39f39c524ea73f2fd935f394fc88100606d38b /tools/perf/scripts/python
parent7359393f3c19c9351e81345ef29f4f47229a6416 (diff)
s390/qeth: overhaul L3 IP address dump code
The current code that dumps the RXIP/VIPA/IPATO addresses via sysfs first checks whether the buffer still provides sufficient space to hold another formatted address. But the maximum length of an formatted IPv4 address is 15 characters, not 12. So we underestimate the max required length and if the buffer was previously filled to _just_ the right level, a formatted address can end up being truncated. Revamp these code paths to use the _actually_ required length of the formatted IP address, and while at it suppress a gratuitous newline. Also use scnprintf() to format the output. In case of a truncation, this would allow us to return the number of characters that were actually written. Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions