util/xxd.py: Add an option for binary files
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 7 Oct 2020 17:40:42 +0000 (12:40 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 7 Oct 2020 21:52:04 +0000 (21:52 +0000)
commitd3dcb1184bfd8ae865af051fdb917b0345dde378
tree071efe6e6a7db4cc98df963e14f6e409a4ae0878
parent82bbf4c3f2392e059ee1890e8c7644081ed8e906
util/xxd.py: Add an option for binary files

If -b is specified, we don't add a null to the end of the char array.
If -b is not specified, we assert that there are no nulls in the middle.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7034>
src/util/xxd.py