adding bin/untar.c

This commit is contained in:
hyung-hwan 2022-11-01 20:31:04 +09:00
parent a4d7080ae7
commit 11dcb01ae0

28
bin/untar.c Normal file
View File

@ -0,0 +1,28 @@
#include <hio-tar.h>
#include <hio-utl.h>
#include <stdio.h>
int main (int argc, char* argv[])
{
hio_t* hio;
if (argc != 2)
{
fprintf (stderr, "Usage: %s <filename>\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;
}