add comment clarifying busybox's use of non-standard tar header
authorPaul Fox <pgf@brightstareng.com>
Sat, 17 Nov 2007 19:11:05 +0000 (19:11 -0000)
committerPaul Fox <pgf@brightstareng.com>
Sat, 17 Nov 2007 19:11:05 +0000 (19:11 -0000)
archival/libunarchive/get_header_tar.c
archival/tar.c

index bbf088cd8cac19c149b361c0277c9952097d7f4b..274bd46077b51fc9f77163a4ed2809d89b158d47 100644 (file)
@@ -61,6 +61,9 @@ char get_header_tar(archive_handle_t *archive_handle)
                char linkname[100]; /* 157-256 */
                /* POSIX:   "ustar" NUL "00" */
                /* GNU tar: "ustar  " NUL */
+               /* Normally it's defined as magic[6] followed by
+                * version[2], but we put them together to save code.
+                */
                char magic[8];      /* 257-264 */
                char uname[32];     /* 265-296 */
                char gname[32];     /* 297-328 */
index bbde88a5715d9631d8be1d2c41147f8e29bea8da..5b19093e86e42c1498fe590e71b8c2ee6a7f9e19 100644 (file)
@@ -52,13 +52,16 @@ struct TarHeader {            /* byte offset */
        char linkname[NAME_SIZE]; /* 157-256 */
        /* POSIX:   "ustar" NUL "00" */
        /* GNU tar: "ustar  " NUL */
+       /* Normally it's defined as magic[6] followed by
+        * version[2], but we put them together to save code.
+        */
        char magic[8];            /* 257-264 */
        char uname[32];           /* 265-296 */
        char gname[32];           /* 297-328 */
        char devmajor[8];         /* 329-336 */
        char devminor[8];         /* 337-344 */
        char prefix[155];         /* 345-499 */
-       char padding[12];         /* 500-512 (pad to exactly the TAR_BLOCK_SIZE) */
+       char padding[12];         /* 500-512 (pad to exactly TAR_BLOCK_SIZE) */
 };
 
 /*