3
0

header_verbose_list.c 721 B

12345678910111213141516171819202122232425262728293031
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  4. */
  5. #include "libbb.h"
  6. #include "unarchive.h"
  7. void header_verbose_list(const file_header_t *file_header)
  8. {
  9. struct tm *mtime = localtime(&(file_header->mtime));
  10. printf("%s %d/%d %9"OFF_FMT"u %4u-%02u-%02u %02u:%02u:%02u %s",
  11. bb_mode_string(file_header->mode),
  12. file_header->uid,
  13. file_header->gid,
  14. file_header->size,
  15. 1900 + mtime->tm_year,
  16. 1 + mtime->tm_mon,
  17. mtime->tm_mday,
  18. mtime->tm_hour,
  19. mtime->tm_min,
  20. mtime->tm_sec,
  21. file_header->name);
  22. if (file_header->link_target) {
  23. printf(" -> %s", file_header->link_target);
  24. }
  25. /* putchar isnt used anywhere else i dont think */
  26. puts("");
  27. }