76 |
do |
do |
77 |
{ |
{ |
78 |
prev_status = status; |
prev_status = status; |
79 |
destroy_stat (¤t_stat_info); |
tar_stat_destroy (¤t_stat_info); |
80 |
xheader_destroy (&extended_header); |
xheader_destroy (&extended_header); |
81 |
|
|
82 |
status = read_header (false); |
status = read_header (false); |
185 |
|
|
186 |
decode_header (current_header, ¤t_stat_info, ¤t_format, 0); |
decode_header (current_header, ¤t_stat_info, ¤t_format, 0); |
187 |
if (verbose_option) |
if (verbose_option) |
188 |
print_header (-1); |
print_header (¤t_stat_info, -1); |
189 |
|
|
190 |
if (incremental_option && current_header->header.typeflag == GNUTYPE_DUMPDIR) |
if (incremental_option && current_header->header.typeflag == GNUTYPE_DUMPDIR) |
191 |
{ |
{ |
933 |
#endif |
#endif |
934 |
|
|
935 |
void |
void |
936 |
print_header (off_t block_ordinal) |
print_header (struct tar_stat_info *st, off_t block_ordinal) |
937 |
{ |
{ |
938 |
char modes[11]; |
char modes[11]; |
939 |
char const *time_stamp; |
char const *time_stamp; |
940 |
char *temp_name = current_stat_info.orig_file_name ? current_stat_info.orig_file_name : current_stat_info.file_name; |
char *temp_name = st->orig_file_name ? st->orig_file_name : st->file_name; |
941 |
|
|
942 |
/* These hold formatted ints. */ |
/* These hold formatted ints. */ |
943 |
char uform[UINTMAX_STRSIZE_BOUND], gform[UINTMAX_STRSIZE_BOUND]; |
char uform[UINTMAX_STRSIZE_BOUND], gform[UINTMAX_STRSIZE_BOUND]; |
1021 |
break; |
break; |
1022 |
} |
} |
1023 |
|
|
1024 |
decode_mode (current_stat_info.stat.st_mode, modes + 1); |
decode_mode (st->stat.st_mode, modes + 1); |
1025 |
|
|
1026 |
/* Time stamp. */ |
/* Time stamp. */ |
1027 |
|
|
1028 |
time_stamp = tartime (current_stat_info.stat.st_mtime); |
time_stamp = tartime (st->stat.st_mtime); |
1029 |
|
|
1030 |
/* User and group names. */ |
/* User and group names. */ |
1031 |
|
|
1032 |
if (current_stat_info.uname && current_format != V7_FORMAT |
if (st->uname && current_format != V7_FORMAT |
1033 |
&& !numeric_owner_option) |
&& !numeric_owner_option) |
1034 |
user = current_stat_info.uname; |
user = st->uname; |
1035 |
else |
else |
1036 |
{ |
{ |
1037 |
/* Try parsing it as an unsigned integer first, and as a |
/* Try parsing it as an unsigned integer first, and as a |
1051 |
} |
} |
1052 |
} |
} |
1053 |
|
|
1054 |
if (current_stat_info.gname && current_format != V7_FORMAT |
if (st->gname && current_format != V7_FORMAT |
1055 |
&& !numeric_owner_option) |
&& !numeric_owner_option) |
1056 |
group = current_stat_info.gname; |
group = st->gname; |
1057 |
else |
else |
1058 |
{ |
{ |
1059 |
/* Try parsing it as an unsigned integer first, and as a |
/* Try parsing it as an unsigned integer first, and as a |
1080 |
case CHRTYPE: |
case CHRTYPE: |
1081 |
case BLKTYPE: |
case BLKTYPE: |
1082 |
strcpy (size, |
strcpy (size, |
1083 |
STRINGIFY_BIGINT (major (current_stat_info.stat.st_rdev), uintbuf)); |
STRINGIFY_BIGINT (major (st->stat.st_rdev), uintbuf)); |
1084 |
strcat (size, ","); |
strcat (size, ","); |
1085 |
strcat (size, |
strcat (size, |
1086 |
STRINGIFY_BIGINT (minor (current_stat_info.stat.st_rdev), uintbuf)); |
STRINGIFY_BIGINT (minor (st->stat.st_rdev), uintbuf)); |
1087 |
break; |
break; |
1088 |
case GNUTYPE_SPARSE: |
case GNUTYPE_SPARSE: |
1089 |
strcpy (size, |
strcpy (size, |
1093 |
uintbuf)); |
uintbuf)); |
1094 |
break; |
break; |
1095 |
default: |
default: |
1096 |
strcpy (size, STRINGIFY_BIGINT (current_stat_info.stat.st_size, uintbuf)); |
strcpy (size, STRINGIFY_BIGINT (st->stat.st_size, uintbuf)); |
1097 |
break; |
break; |
1098 |
} |
} |
1099 |
|
|
1111 |
switch (current_header->header.typeflag) |
switch (current_header->header.typeflag) |
1112 |
{ |
{ |
1113 |
case SYMTYPE: |
case SYMTYPE: |
1114 |
fprintf (stdlis, " -> %s\n", quotearg (current_stat_info.link_name)); |
fprintf (stdlis, " -> %s\n", quotearg (st->link_name)); |
1115 |
break; |
break; |
1116 |
|
|
1117 |
case LNKTYPE: |
case LNKTYPE: |
1118 |
fprintf (stdlis, _(" link to %s\n"), quotearg (current_stat_info.link_name)); |
fprintf (stdlis, _(" link to %s\n"), quotearg (st->link_name)); |
1119 |
break; |
break; |
1120 |
|
|
1121 |
default: |
default: |