Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 May 2020 00:10:25 +0000 (UTC)
From:      Chuck Silvers <chs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360559 - head/sbin/dumpfs
Message-ID:  <202005020010.0420APw7094823@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: chs
Date: Sat May  2 00:10:25 2020
New Revision: 360559
URL: https://svnweb.freebsd.org/changeset/base/360559

Log:
  Print the fs last-mounted time too.
  
  Reviewed by:	mckusick
  Approved by:	mckusick (mentor)
  Sponsored by:	Netflix

Modified:
  head/sbin/dumpfs/dumpfs.c

Modified: head/sbin/dumpfs/dumpfs.c
==============================================================================
--- head/sbin/dumpfs/dumpfs.c	Sat May  2 00:08:44 2020	(r360558)
+++ head/sbin/dumpfs/dumpfs.c	Sat May  2 00:10:25 2020	(r360559)
@@ -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",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005020010.0420APw7094823>