The branch main has been updated by mckusick:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4d512b07357f6a4feff8ac266f90d34939a57be4

commit 4d512b07357f6a4feff8ac266f90d34939a57be4
Author:     Kirk McKusick <mckus...@freebsd.org>
AuthorDate: 2023-07-25 21:02:33 +0000
Commit:     Kirk McKusick <mckus...@freebsd.org>
CommitDate: 2023-07-25 21:03:43 +0000

    Debugging output additions. No functional changes intended.
    
    MFC-after:    1 week
    Sponsored-by: The FreeBSD Foundation
---
 sbin/fsck_ffs/main.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c
index 56883d682ce8..0acf7e709180 100644
--- a/sbin/fsck_ffs/main.c
+++ b/sbin/fsck_ffs/main.c
@@ -438,7 +438,7 @@ checkfilesys(char *filesys)
        /*
         * 1: scan inodes tallying blocks used
         */
-       if (preen == 0) {
+       if (preen == 0 || debug) {
                printf("** Last Mounted on %s\n", sblock.fs_fsmnt);
                if (mntp != NULL && mntp->f_flags & MNT_ROOTFS)
                        printf("** Root file system\n");
@@ -457,7 +457,8 @@ checkfilesys(char *filesys)
                            preen ? "-p" : "",
                            (preen && usedsoftdep) ? " AND " : "",
                            usedsoftdep ? "SOFTUPDATES" : "");
-               printf("** Phase 1b - Rescan For More DUPS\n");
+               if (preen == 0 || debug)
+                       printf("** Phase 1b - Rescan For More DUPS\n");
                pass1b();
                IOstats("Pass1b");
        }
@@ -465,7 +466,7 @@ checkfilesys(char *filesys)
        /*
         * 2: traverse directories from root to mark all connected directories
         */
-       if (preen == 0)
+       if (preen == 0 || debug)
                printf("** Phase 2 - Check Pathnames\n");
        pass2();
        IOstats("Pass2");
@@ -473,7 +474,7 @@ checkfilesys(char *filesys)
        /*
         * 3: scan inodes looking for disconnected directories
         */
-       if (preen == 0)
+       if (preen == 0 || debug)
                printf("** Phase 3 - Check Connectivity\n");
        pass3();
        IOstats("Pass3");
@@ -481,7 +482,7 @@ checkfilesys(char *filesys)
        /*
         * 4: scan inodes looking for disconnected files; check reference counts
         */
-       if (preen == 0)
+       if (preen == 0 || debug)
                printf("** Phase 4 - Check Reference Counts\n");
        pass4();
        IOstats("Pass4");
@@ -489,7 +490,7 @@ checkfilesys(char *filesys)
        /*
         * 5: check and repair resource counts in cylinder groups
         */
-       if (preen == 0)
+       if (preen == 0 || debug)
                printf("** Phase 5 - Check Cyl groups\n");
        snapflush(std_checkblkavail);
        if (cgheader_corrupt) {

Reply via email to