forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2010-07-27 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
2010-07-27 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
||||||
|
|
||||||
* posix/src/sigsuspend.c: Do not assert unless RTEMS_DEBUG is defined.
|
* posix/src/sigsuspend.c: Do not assert unless RTEMS_DEBUG is defined.
|
||||||
|
|||||||
@@ -46,7 +46,8 @@
|
|||||||
* 148 8 bytes Header checksum (in octal ascii)
|
* 148 8 bytes Header checksum (in octal ascii)
|
||||||
* 156 1 bytes Link flag
|
* 156 1 bytes Link flag
|
||||||
* 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
|
* 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)
|
* 265 32 bytes User name ('\0' terminated, 31 maxmum length)
|
||||||
* 297 32 bytes Group 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)
|
* 329 8 bytes Major device ID (in octal ascii)
|
||||||
@@ -124,7 +125,7 @@ int rtems_tarfs_load(
|
|||||||
*/
|
*/
|
||||||
hdr_ptr = (char *) &tar_image[offset];
|
hdr_ptr = (char *) &tar_image[offset];
|
||||||
offset += 512;
|
offset += 512;
|
||||||
if (strncmp(&hdr_ptr[257], "ustar ", 7))
|
if (strncmp(&hdr_ptr[257], "ustar", 5))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
|
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
* 148 8 bytes Header checksum (in octal ascii)
|
* 148 8 bytes Header checksum (in octal ascii)
|
||||||
* 156 1 bytes Link flag
|
* 156 1 bytes Link flag
|
||||||
* 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
|
* 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)
|
* 265 32 bytes User name ('\0' terminated, 31 maxmum length)
|
||||||
* 297 32 bytes Group 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)
|
* 329 8 bytes Major device ID (in octal ascii)
|
||||||
@@ -143,7 +144,7 @@ Untar_FromMemory(
|
|||||||
/* Read the header */
|
/* Read the header */
|
||||||
bufr = &tar_ptr[ptr];
|
bufr = &tar_ptr[ptr];
|
||||||
ptr += 512;
|
ptr += 512;
|
||||||
if (strncmp(&bufr[257], "ustar ", 7))
|
if (strncmp(&bufr[257], "ustar", 5))
|
||||||
{
|
{
|
||||||
retval = UNTAR_SUCCESSFUL;
|
retval = UNTAR_SUCCESSFUL;
|
||||||
break;
|
break;
|
||||||
@@ -283,7 +284,7 @@ Untar_FromFile(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmp(&bufr[257], "ustar ", 7))
|
if (strncmp(&bufr[257], "ustar", 5))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user