aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorGrant Likely <[email protected]>2012-05-31 16:26:08 -0700
committerLinus Torvalds <[email protected]>2012-05-31 17:49:27 -0700
commit725fe002d315c2501c110b7245d3eb4f4535f4d6 (patch)
treec68759e4765673eb1f28e220edea40d84d9ff744 /tools/perf/scripts/python/netdev-times.py
parentd84970bbaf9a09b3fc60c18ee6d59bc9cb4c3b8a (diff)
vsprintf: correctly handle width when '#' flag used in %#p format
The '%p' output of the kernel's vsprintf() uses spec.field_width to determine how many digits to output based on 2 * sizeof(void*) so that all digits of a pointer are shown. ie. a pointer will be output as "001A2B3C" instead of "1A2B3C". However, if the '#' flag is used in the format (%#p), then the code doesn't take into account the width of the '0x' prefix and will end up outputing "0x1A2B3C" instead of "0x001A2B3C". This patch reworks the "pointer()" format hook to include 2 characters for the '0x' prefix if the '#' flag is included. [[email protected]: checkpatch fixes] Signed-off-by: Grant Likely <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions