aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs
diff options
context:
space:
mode:
authorChuck Silvers <chs@FreeBSD.org>2020-05-02 00:10:25 +0000
committerChuck Silvers <chs@FreeBSD.org>2020-05-02 00:10:25 +0000
commita9d9cfff0151d27ef220bae6fe1eba9f88a92792 (patch)
treec297d522ea73685e71febd9ec6c8dfb4aa27eb0f /sbin/dumpfs
parent7f5e007d04ed330fe2674f7a4fe2e33301c02df8 (diff)
downloadsrc-a9d9cfff0151d27ef220bae6fe1eba9f88a92792.tar.gz
src-a9d9cfff0151d27ef220bae6fe1eba9f88a92792.zip
Print the fs last-mounted time too.
Reviewed by: mckusick Approved by: mckusick (mentor) Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=360559
Diffstat (limited to 'sbin/dumpfs')
-rw-r--r--sbin/dumpfs/dumpfs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index d1ba635f9f26..3ac59ccc0875 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -156,7 +156,7 @@ dumpfsid(void)
static int
dumpfs(const char *name)
{
- time_t fstime;
+ time_t fstime, fsmtime;
int64_t fssize;
int32_t fsflags;
int i;
@@ -165,8 +165,10 @@ dumpfs(const char *name)
case 2:
fssize = afs.fs_size;
fstime = afs.fs_time;
- printf("magic\t%x (UFS2)\ttime\t%s",
- afs.fs_magic, ctime(&fstime));
+ fsmtime = afs.fs_mtime;
+ printf("magic\t%x (UFS2)\n", afs.fs_magic);
+ printf("last mounted time\t%s", ctime(&fsmtime));
+ printf("last modified time\t%s", ctime(&fstime));
printf("superblock location\t%jd\tid\t[ %08x %08x ]\n",
(intmax_t)afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]);
printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n",