summaryrefslogtreecommitdiff
path: root/src/ostree/ot-dump.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-12-10 15:01:44 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-12 19:31:16 +0000
commit7b8a6d0c6525ea984edf577f91bf1c42ca2796fb (patch)
treea8ab19c29275aa687d622297f0d9de254cd6a5cc /src/ostree/ot-dump.c
parentac092895b10be506eada983a15c8d128158b7ad7 (diff)
downloadostree-7b8a6d0c6525ea984edf577f91bf1c42ca2796fb.tar.gz
bin/show: Add --no-byteswap
rpm-ostree writes host-endian data when importing packages, so let's add support for not byteswapping. Closes: #1372 Approved by: jlebon
Diffstat (limited to 'src/ostree/ot-dump.c')
-rw-r--r--src/ostree/ot-dump.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ostree/ot-dump.c b/src/ostree/ot-dump.c
index 7f7f8b6b..071530f8 100644
--- a/src/ostree/ot-dump.c
+++ b/src/ostree/ot-dump.c
@@ -157,7 +157,12 @@ ot_dump_object (OstreeObjectType objtype,
{
g_print ("%s %s\n", ostree_object_type_to_string (objtype), checksum);
- if (flags & OSTREE_DUMP_RAW)
+ if (flags & OSTREE_DUMP_UNSWAPPED)
+ {
+ g_autofree char *formatted = g_variant_print (variant, TRUE);
+ g_print ("%s\n", formatted);
+ }
+ else if (flags & OSTREE_DUMP_RAW)
{
ot_dump_variant (variant);
return;