]> Dogcows Code - chaz/tar/blobdiff - src/list.c
(struct xhdr_tab.keyword): Now pointer to const.
[chaz/tar] / src / list.c
index 13140eb5873472734d80e134f86b81157fd112ac..e5e187f2a78ea332328217f51f6c2a43d3834c41 100644 (file)
@@ -76,10 +76,11 @@ read_and (void (*do_something) (void))
   while (1)
     {
       prev_status = status;
-      status = read_header (0);
+      status = read_header (false);
       switch (status)
        {
        case HEADER_STILL_UNREAD:
+       case HEADER_SUCCESS_EXTENDED:
          abort ();
 
        case HEADER_SUCCESS:
@@ -159,6 +160,9 @@ read_and (void (*do_something) (void))
            case HEADER_FAILURE:
              /* We are in the middle of a cascade of errors.  */
              break;
+
+           case HEADER_SUCCESS_EXTENDED:
+             abort ();
            }
          continue;
        }
@@ -175,12 +179,9 @@ list_archive (void)
 {
   /* Print the header block.  */
 
+  decode_header (current_header, &current_stat_info, &current_format, 0);
   if (verbose_option)
-    {
-      if (verbose_option > 1)
-       decode_header (current_header, &current_stat_info, &current_format, 0);
-      print_header (-1);
-    }
+    print_header (-1);
 
   if (incremental_option && current_header->header.typeflag == GNUTYPE_DUMPDIR)
     {
@@ -548,7 +549,7 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
        }
     }
 
-  if (extended_header.nblocks)
+  if (extended_header.size)
     xheader_decode (stat_info);
 }
 
@@ -1021,9 +1022,9 @@ print_header (off_t block_ordinal)
 
       /* User and group names.  */
 
-      if (*current_header->header.uname && current_format != V7_FORMAT
+      if (current_stat_info.uname && current_format != V7_FORMAT
          && !numeric_owner_option)
-       user = current_header->header.uname;
+       user = current_stat_info.uname;
       else
        {
          /* Try parsing it as an unsigned integer first, and as a
@@ -1043,9 +1044,9 @@ print_header (off_t block_ordinal)
            }
        }
 
-      if (*current_header->header.gname && current_format != V7_FORMAT
+      if (current_stat_info.gname && current_format != V7_FORMAT
          && !numeric_owner_option)
-       group = current_header->header.gname;
+       group = current_stat_info.gname;
       else
        {
          /* Try parsing it as an unsigned integer first, and as a
This page took 0.023684 seconds and 4 git commands to generate.