diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-27 18:11:42 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-27 18:11:42 +0000 |
commit | 4f3d72fb5383b08065624d212a587b2e2b654cfd (patch) | |
tree | 4b4a12503df87eec8ac95196df3520dad13c8608 /cpukit/libfs | |
parent | 2010-07-27 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-4f3d72fb5383b08065624d212a587b2e2b654cfd.tar.bz2 |
2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com>
* libfs/src/imfs/imfs_load_tar.c, libmisc/untar/untar.c: Now supports
both pax and GNU tar created tar files.
Diffstat (limited to 'cpukit/libfs')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_load_tar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c index c542d34161..3cb3c4e195 100644 --- a/cpukit/libfs/src/imfs/imfs_load_tar.c +++ b/cpukit/libfs/src/imfs/imfs_load_tar.c @@ -46,7 +46,8 @@ * 148 8 bytes Header checksum (in octal ascii) * 156 1 bytes Link flag * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length) - * 257 8 bytes Magic ("ustar \0") + * 257 8 bytes Magic PAX ("ustar\0" + 2 bytes padding) + * 257 8 bytes Magic GNU tar ("ustar \0") * 265 32 bytes User name ('\0' terminated, 31 maxmum length) * 297 32 bytes Group name ('\0' terminated, 31 maxmum length) * 329 8 bytes Major device ID (in octal ascii) @@ -124,7 +125,7 @@ int rtems_tarfs_load( */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; - if (strncmp(&hdr_ptr[257], "ustar ", 7)) + if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); |