Show modification time, not create time as seems to be the common case

for ls.
This commit is contained in:
rocky
2005-02-26 15:41:20 +00:00
parent 8c6963dba9
commit 70025d7a32
4 changed files with 31 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
/* /*
$Id: util.c,v 1.43 2005/02/22 02:02:46 rocky Exp $ $Id: util.c,v 1.44 2005/02/26 15:41:20 rocky Exp $
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com> Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -500,23 +500,12 @@ print_fs_attrs(iso9660_stat_t *p_statbuf, bool b_rock, bool b_xa,
strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &p_statbuf->tm); strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &p_statbuf->tm);
/* Some RRIP writers incorrectly place ctime in the TF_CREATE field. /* Now try the proper field for mtime: attributes */
Try to handle this correctly for either case. */ if (p_statbuf->rr.modify.b_used) {
if (p_statbuf->rr.create.b_used) { if (p_statbuf->rr.modify.b_longdate) {
if (p_statbuf->rr.create.b_longdate) { iso9660_get_ltime(&p_statbuf->rr.modify.t.ltime, &tm);
iso9660_get_ltime(&p_statbuf->rr.create.t.ltime, &tm);
} else { } else {
iso9660_get_dtime(&p_statbuf->rr.create.t.dtime, true, &tm); iso9660_get_dtime(&p_statbuf->rr.modify.t.dtime, true, &tm);
}
strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &p_statbuf->tm);
}
/* Now try the proper field for ctime: attributes */
if (p_statbuf->rr.attributes.b_used) {
if (p_statbuf->rr.create.b_longdate) {
iso9660_get_ltime(&p_statbuf->rr.attributes.t.ltime, &tm);
} else {
iso9660_get_dtime(&p_statbuf->rr.attributes.t.dtime, true, &tm);
} }
strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &tm); strftime(date_str, sizeof(date_str), "%b %d %Y %H:%M ", &tm);
} }

View File

@@ -22,7 +22,7 @@ ISO9660 filesystem
/: /:
drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26 . drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26 .
drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26 .. drwxrwxr-x 3 715 715 [LSN 23] 2048 Apr 20 2003 11:26 ..
-rw-r--r-- 1 715 715 [LSN 26] 17992 Apr 20 2003 11:26 COPYING -rw-r--r-- 1 715 715 [LSN 26] 17992 Jul 29 2002 12:39 COPYING
drwxrwxr-x 2 715 715 [LSN 24] 2048 Apr 20 2003 16:18 doc drwxrwxr-x 2 715 715 [LSN 24] 2048 Apr 20 2003 16:18 doc
/doc/: /doc/:

View File

@@ -4,20 +4,20 @@ PARTICULAR PURPOSE.
__________________________________ __________________________________
ISO-9660 Information ISO-9660 Information
/: /:
d [LSN 28] 2048 Oct 22 2004 18:44 . d [LSN 28] 2048 Oct 22 2004 22:44 .
d [LSN 28] 2048 Oct 22 2004 18:44 .. d [LSN 28] 2048 Oct 22 2004 22:44 ..
d [LSN 29] 2048 Oct 22 2004 18:44 libcdio d [LSN 29] 2048 Oct 22 2004 22:44 libcdio
/libcdio/: /libcdio/:
d [LSN 29] 2048 Oct 22 2004 18:44 . d [LSN 29] 2048 Oct 22 2004 22:44 .
d [LSN 28] 2048 Oct 22 2004 18:44 .. d [LSN 28] 2048 Oct 22 2004 22:44 ..
- [LSN 34] 17992 Mar 12 2004 02:18 copying - [LSN 34] 17992 Mar 12 2004 07:18 copying
- [LSN 43] 2156 Jun 26 2004 06:01 readme - [LSN 43] 2156 Jun 26 2004 10:01 readme
- [LSN 45] 2849 Aug 12 2004 05:22 readme.libcdio - [LSN 45] 2849 Aug 12 2004 09:22 readme.libcdio
d [LSN 30] 2048 Oct 22 2004 18:44 test d [LSN 30] 2048 Oct 22 2004 22:44 test
/libcdio/test/: /libcdio/test/:
d [LSN 30] 2048 Oct 22 2004 18:44 . d [LSN 30] 2048 Oct 22 2004 22:44 .
d [LSN 29] 2048 Oct 22 2004 18:44 .. d [LSN 29] 2048 Oct 22 2004 22:44 ..
- [LSN 47] 74 Jul 25 2004 05:52 isofs_m1.cue - [LSN 47] 74 Jul 25 2004 09:52 isofs_m1.cue

View File

@@ -4,20 +4,20 @@ PARTICULAR PURPOSE.
__________________________________ __________________________________
ISO-9660 Information ISO-9660 Information
/: /:
d [LSN 31] 2048 Oct 22 2004 18:44 . d [LSN 31] 2048 Oct 22 2004 22:44 .
d [LSN 31] 2048 Oct 22 2004 18:44 .. d [LSN 31] 2048 Oct 22 2004 22:44 ..
d [LSN 32] 2048 Oct 22 2004 18:44 libcdio d [LSN 32] 2048 Oct 22 2004 22:44 libcdio
/libcdio/: /libcdio/:
d [LSN 32] 2048 Oct 22 2004 18:44 . d [LSN 32] 2048 Oct 22 2004 22:44 .
d [LSN 31] 2048 Oct 22 2004 18:44 .. d [LSN 31] 2048 Oct 22 2004 22:44 ..
- [LSN 34] 17992 Mar 12 2004 02:18 COPYING - [LSN 34] 17992 Mar 12 2004 07:18 COPYING
- [LSN 43] 2156 Jun 26 2004 06:01 README - [LSN 43] 2156 Jun 26 2004 10:01 README
- [LSN 45] 2849 Aug 12 2004 05:22 README.libcdio - [LSN 45] 2849 Aug 12 2004 09:22 README.libcdio
d [LSN 33] 2048 Oct 22 2004 18:44 test d [LSN 33] 2048 Oct 22 2004 22:44 test
/libcdio/test/: /libcdio/test/:
d [LSN 33] 2048 Oct 22 2004 18:44 . d [LSN 33] 2048 Oct 22 2004 22:44 .
d [LSN 32] 2048 Oct 22 2004 18:44 .. d [LSN 32] 2048 Oct 22 2004 22:44 ..
- [LSN 47] 74 Jul 25 2004 05:52 isofs-m1.cue - [LSN 47] 74 Jul 25 2004 09:52 isofs-m1.cue