[1/4] cpio: export get_cpiohdr function
diff mbox series

Message ID 20190828052014.2466-1-sbabic@denx.de
State Accepted
Headers show
Series
  • [1/4] cpio: export get_cpiohdr function
Related show

Commit Message

Stefano Babic Aug. 28, 2019, 5:20 a.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/cpio_utils.c | 2 +-
 include/cpiohdr.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/core/cpio_utils.c b/core/cpio_utils.c
index 182ff1a..1b6cb14 100644
--- a/core/cpio_utils.c
+++ b/core/cpio_utils.c
@@ -26,7 +26,7 @@ 
 
 #define NPAD_BYTES(o) ((4 - (o % 4)) % 4)
 
-static int get_cpiohdr(unsigned char *buf, unsigned long *size,
+int get_cpiohdr(unsigned char *buf, unsigned long *size,
 			unsigned long *namesize, unsigned long *chksum)
 {
 	struct new_ascii_header *cpiohdr;
diff --git a/include/cpiohdr.h b/include/cpiohdr.h
index 46f4250..855d5e8 100644
--- a/include/cpiohdr.h
+++ b/include/cpiohdr.h
@@ -49,6 +49,8 @@  struct filehdr {
 	char filename[MAX_IMAGE_FNAME];
 };
 
+int get_cpiohdr(unsigned char *buf, unsigned long *size,
+			unsigned long *namesize, unsigned long *chksum);
 int extract_cpio_header(int fd, struct filehdr *fhdr, unsigned long *offset);
 int extract_img_from_cpio(int fd, unsigned long offset, struct filehdr *fdh);