1 /* vi: set sw=4 ts=4: */
3 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
9 void FAST_FUNC
header_verbose_list(const file_header_t
*file_header
)
11 struct tm
*mtime
= localtime(&(file_header
->mtime
));
13 #if ENABLE_FEATURE_TAR_UNAME_GNAME
16 char *user
= file_header
->uname
;
17 char *group
= file_header
->gname
;
20 snprintf(uid
, sizeof(uid
), "%u", (unsigned)file_header
->uid
);
24 snprintf(gid
, sizeof(gid
), "%u", (unsigned)file_header
->gid
);
27 printf("%s %s/%s %9u %4u-%02u-%02u %02u:%02u:%02u %s",
28 bb_mode_string(file_header
->mode
),
31 (unsigned int) file_header
->size
,
32 1900 + mtime
->tm_year
,
39 #else /* !FEATURE_TAR_UNAME_GNAME */
40 printf("%s %d/%d %9"OFF_FMT
"u %4u-%02u-%02u %02u:%02u:%02u %s",
41 bb_mode_string(file_header
->mode
),
45 1900 + mtime
->tm_year
,
52 #endif /* FEATURE_TAR_UNAME_GNAME */
54 if (file_header
->link_target
) {
55 printf(" -> %s", file_header
->link_target
);