Using tar to access files

Sujay Raj sujayraaj at gmail.com
Tue Jun 30 04:39:28 UTC 2015


I need to access configurations files the for web server I am porting to
rtems.

I create a tar archive , that contains the required folders and files ,
convert it into c source using rtems-bin2c , ( a header file and a c source
) and link them with my project.

In the init, I call

sc = Untar_FromMemory((void *)TARFILE_START, (size_t)TARFILE_SIZE);

where TARFILE_START is the macro with the name of the array , TARFILE_SIZE
is the size of the array.

But when I run the program, I get errors of the form

"Untar: failed to create file <folder>/<filename>"

for all the files in the tar archive (there are about 10 files, 10 errors).

There are no build errors, and since my application recognizes files
present in the tar archive, I think possibly I am missing to initialize
something.

Help would be really appreciated.

Thanks and Regards,
Sujay Raj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20150630/6a460168/attachment.html>


More information about the devel mailing list