From 1240d29209c1e1bac556113485a894f6ef4ae0af Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 10 Mar 2014 14:13:27 -0500 Subject: cbfstool: add bputs() to store a byte stream to a buffer There was already a bgets() function which operates on a buffer to copy a byte stream. Provide bputs() to store a byte stream to a buffer, thus making the API symmetrical. Change-Id: I6166f6b68eacb822da38c9da61a3e44f4c67136d Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/5366 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/cbfstool/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/cbfstool/common.h') diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index 16e75f9cf9..d0069c3d58 100644 --- a/util/cbfstool/common.h +++ b/util/cbfstool/common.h @@ -112,6 +112,7 @@ struct xdr { /* xdr.c */ extern struct xdr xdr_le, xdr_be; -int bgets(struct buffer *input, void *output, size_t len); +size_t bgets(struct buffer *input, void *output, size_t len); +size_t bputs(struct buffer *b, const void *data, size_t len); #endif -- cgit v1.2.3