+2002-10-25 Theodore Ts'o <tytso@mit.edu>
+
+ * ls.c (list_super2): Print the s_mkfs_time field if it is
+ present. If the last mount time (s_mtime) is zero, print
+ "n/a".
+
2002-10-20 Theodore Ts'o <tytso@valinux.com>
* e2p.h (e2p_string2mntopt), mntopts.c, ls.c (print_mntopts):
fprintf(f, "Fragments per group: %u\n", sb->s_frags_per_group);
fprintf(f, "Inodes per group: %u\n", sb->s_inodes_per_group);
fprintf(f, "Inode blocks per group: %u\n", inode_blocks_per_group);
- tm = sb->s_mtime;
if (sb->s_first_meta_bg)
fprintf(f, "First meta block group: %u\n",
sb->s_first_meta_bg);
- fprintf(f, "Last mount time: %s", ctime(&tm));
+ if (sb->s_mkfs_time) {
+ tm = sb->s_mkfs_time;
+ fprintf(f, "Filesystem created: %s", ctime(&tm));
+ }
+ tm = sb->s_mtime;
+ fprintf(f, "Last mount time: %s",
+ sb->s_mtime ? ctime(&tm) : "n/a\n");
tm = sb->s_wtime;
fprintf(f, "Last write time: %s", ctime(&tm));
fprintf(f, "Mount count: %u\n", sb->s_mnt_count);
+2002-10-25 Theodore Ts'o <tytso@mit.edu>
+
+ * ext2_fs.h: Add a new superblock field, s_mkfs_time, so that we
+ know when a filesystem was created. (Sometimes this can
+ be useful...)
+
+ * initialize.c (ext2fs_initialize): Set the s_mkfs_time field.
+
2002-10-20 Theodore Ts'o <tytso@valinux.com>
* ext2_fs.h (EXT3_DEFM_JMODE): Add new default mount options for
__u16 s_reserved_word_pad;
__u32 s_default_mount_opts;
__u32 s_first_meta_bg; /* First metablock group */
- __u32 s_reserved[190]; /* Padding to the end of the block */
+ __u32 s_mkfs_time; /* When the filesystem was created */
+ __u32 s_reserved[189]; /* Padding to the end of the block */
};
/*
}
set_field(s_checkinterval, EXT2_DFL_CHECKINTERVAL);
- super->s_lastcheck = time(NULL);
+ super->s_mkfs_time = super->s_lastcheck = time(NULL);
super->s_creator_os = CREATOR_OS;