Changeset 4f3d72f in rtems


Ignore:
Timestamp:
Jul 27, 2010, 6:11:42 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
270434cc
Parents:
234a36c
Message:

2010-07-27 Joel Sherrill <joel.sherrill@…>

  • libfs/src/imfs/imfs_load_tar.c, libmisc/untar/untar.c: Now supports both pax and GNU tar created tar files.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r234a36c r4f3d72f  
     12010-07-27      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libfs/src/imfs/imfs_load_tar.c, libmisc/untar/untar.c: Now supports
     4        both pax and GNU tar created tar files.
     5
    162010-07-27      Joel Sherrill <joel.sherrilL@OARcorp.com>
    27
  • cpukit/libfs/src/imfs/imfs_load_tar.c

    r234a36c r4f3d72f  
    4747 *   156      1 bytes  Link flag
    4848 *   157    100 bytes  Linkname ('\0' terminated, 99 maxmum length)
    49  *   257      8 bytes  Magic ("ustar  \0")
     49 *   257      8 bytes  Magic PAX ("ustar\0" + 2 bytes padding)
     50 *   257      8 bytes  Magic GNU tar ("ustar  \0")
    5051 *   265     32 bytes  User name ('\0' terminated, 31 maxmum length)
    5152 *   297     32 bytes  Group name ('\0' terminated, 31 maxmum length)
     
    125126    hdr_ptr = (char *) &tar_image[offset];
    126127    offset += 512;
    127     if (strncmp(&hdr_ptr[257], "ustar  ", 7))
     128    if (strncmp(&hdr_ptr[257], "ustar", 5))
    128129      break;
    129130
  • cpukit/libmisc/untar/untar.c

    r234a36c r4f3d72f  
    4040 *   156      1 bytes  Link flag
    4141 *   157    100 bytes  Linkname ('\0' terminated, 99 maxmum length)
    42  *   257      8 bytes  Magic ("ustar  \0")
     42 *   257      8 bytes  Magic PAX ("ustar\0" + 2 bytes padding)
     43 *   257      8 bytes  Magic GNU tar ("ustar  \0")
    4344 *   265     32 bytes  User name ('\0' terminated, 31 maxmum length)
    4445 *   297     32 bytes  Group name ('\0' terminated, 31 maxmum length)
     
    144145      bufr = &tar_ptr[ptr];
    145146      ptr += 512;
    146       if (strncmp(&bufr[257], "ustar  ", 7))
     147      if (strncmp(&bufr[257], "ustar", 5))
    147148      {
    148149         retval = UNTAR_SUCCESSFUL;
     
    284285      }
    285286
    286       if (strncmp(&bufr[257], "ustar  ", 7))
     287      if (strncmp(&bufr[257], "ustar", 5))
    287288      {
    288289         break;
Note: See TracChangeset for help on using the changeset viewer.