Hello Gedare, On Wednesday 09 of September 2015 17:05:43 Gedare Bloom wrote: > Do we still have two versions of the untar code?
There is another implementation which is IMFS specific. It is invoked by function rtems_tarfs_load() located in rtems/cpukit/libfs/src/imfs/imfs_load_tar.c It is better optimized that it does not copy data from image to RAM. But on the other hand is specific for IMFS only. The corrected implementation rtems/cpukit/libmisc/untar/untar.c is generic untar code which is independent on filesystem. So it can be used (in theory) to untar file to FAT or other filesystems and supports untar from memory Untar_FromMemory() and Untar_FromFile(). It has disadvantage that does not easily support to specify location where to untar when compared with rtems_tarfs_load(). So both implementations are not 1:1 feature equivalent. The rtems_tarfs_load() has been introduced in 2000 year. We use Untar_FromMemory() in our application but it may be more for historical reasons than that use of rtems_tarfs_load() would not provide same function and rtems_tarfs_load() is much less memory hungry than Untar_FromMemory(). But I think that it would worth to fix untar.c when it is present. It correctly worked in previous releases and (as I have located now) has been broken at commit e075b388728408e8745408c8dbdbe9635ccea399 untar: check return value from mkdir by Gedare Bloom :-) Best wishes, Pavel > This looks good to commit. > > On Mon, Sep 7, 2015 at 5:23 AM, Pavel Pisa <p...@cmp.felk.cvut.cz> wrote: > > --- > > cpukit/libmisc/untar/untar.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c > > index aed8fed..4591a8b 100644 > > --- a/cpukit/libmisc/untar/untar.c > > +++ b/cpukit/libmisc/untar/untar.c _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel