hexstring_n2a() writes into a caller-supplied buffer and silently
truncates when it is too small: the loop stops once fewer than three
bytes remain and returns the partial string. Callers using a fixed
SPRINT_BUF therefore drop trailing bytes for keys wider than 31 bytes.
Add a new function print_hexstring() that formats and prints a binary
attribute in one call.
Convert the callers that dump a binary attribute straight to output
over to print_hexstring().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reported-by: Gris Ge <cnfourt@gmail.com>