summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/cbfs.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2014-08-05 10:48:20 -0500
committerAaron Durbin <adurbin@google.com>2014-08-07 19:05:43 +0200
commitca63027ef7627ba60f6776f2c9bd373cdb2afbb0 (patch)
tree19234899f0ad46d2b29f43d8ba87ecc3efdf6d5e /util/cbfstool/cbfs.h
parent4acd8ea778388392475ee14cb5efe5f453da3159 (diff)
downloadcoreboot-staging-ca63027ef7627ba60f6776f2c9bd373cdb2afbb0.zip
coreboot-staging-ca63027ef7627ba60f6776f2c9bd373cdb2afbb0.tar.gz
cbfstool: process cbfs_payload_segment(s) in host byte order
The printing routines of the cbfs_payload_segment assumed the type could be accessed in host order. Each of the fields need to be converted to the host order before inspecting the fields. In addition, this removes all the ntoh*() calls while processing the cbfs_payload_segment structures. cbfstool would crash adding entries or just printing entries containing a payload when -v was passed on the command line. Change-Id: Iff41c64a99001b9e3920e2e26828c5fd6e671239 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/6498 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <gaumless@gmail.com>
Diffstat (limited to 'util/cbfstool/cbfs.h')
-rw-r--r--util/cbfstool/cbfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index 73ee49c..52a4a50 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -131,5 +131,7 @@ void cbfs_file_get_header(struct buffer *buf, struct cbfs_file *file);
/* cbfs-mkpayload.c */
void xdr_segs(struct buffer *output,
struct cbfs_payload_segment *segs, int nseg);
+void xdr_get_seg(struct cbfs_payload_segment *out,
+ struct cbfs_payload_segment *in);
#endif
OpenPOWER on IntegriCloud