header_verbose_list.c 672 B

1234567891011121314151617181920212223242526272829
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <time.h>
  4. #include "libbb.h"
  5. #include "unarchive.h"
  6. extern void header_verbose_list(const file_header_t *file_header)
  7. {
  8. struct tm *mtime = localtime(&file_header->mtime);
  9. printf("%s %d/%d%10u %4u-%02u-%02u %02u:%02u:%02u %s",
  10. bb_mode_string(file_header->mode),
  11. file_header->uid,
  12. file_header->gid,
  13. (unsigned int) file_header->size,
  14. 1900 + mtime->tm_year,
  15. 1 + mtime->tm_mon,
  16. mtime->tm_mday,
  17. mtime->tm_hour,
  18. mtime->tm_min,
  19. mtime->tm_sec,
  20. file_header->name);
  21. if (file_header->link_name) {
  22. printf(" -> %s", file_header->link_name);
  23. }
  24. /* putchar isnt used anywhere else i dont think */
  25. puts("");
  26. }