From 11dcb01ae044ab7c92893a01e020d6698c47b251 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 1 Nov 2022 20:31:04 +0900 Subject: [PATCH] adding bin/untar.c --- bin/untar.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bin/untar.c diff --git a/bin/untar.c b/bin/untar.c new file mode 100644 index 0000000..8ad9caf --- /dev/null +++ b/bin/untar.c @@ -0,0 +1,28 @@ +#include +#include +#include + + +int main (int argc, char* argv[]) +{ + hio_t* hio; + + if (argc != 2) + { + fprintf (stderr, "Usage: %s \n", hio_get_base_name_bcstr(argv[0])); + return -1; + } + + hio = hio_open(HIO_NULL, 0, HIO_NULL, HIO_FEATURE_ALL, 512, HIO_NULL); + if (!hio) + { + fprintf (stderr, "Error: unable to open hio\n"); + return -1; + } + + hio_extract_tar(hio, argv[1]); + + hio_close (hio); + return 0; +} +