dbus-send: pretty-print GVariant-style bytestrings
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 13 Feb 2015 18:55:31 +0000 (18:55 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 16 Feb 2015 11:44:16 +0000 (11:44 +0000)
commit3ca9aa9cc054aee6d89d0c4bfda23294a1414e3e
tree9322788cb5de76be94e92bc3ba3808411a011d5e
parent890b1dd5c5015203fb0e5235d06528b362879bd0
dbus-send: pretty-print GVariant-style bytestrings

dbus-send could already pretty-print bytestrings that do not have
\0 termination, but those are awkward to work with (they need copying),
so they are now discouraged. Teach it to print bytestrings that
do have \0 termination as well.

In the process, rewrite this part of the message parser
to use dbus_message_iter_get_fixed_array(), which is the Right way
to get arrays of numbers out of a message.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89109
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
tools/Makefile.am
tools/dbus-print-message.c