Subject: fsck_lfs: prompt before rolling forward?
To: None <current-users@netbsd.org, tech-userlevel@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: current-users
Date: 11/28/2006 02:21:14
The patch below makes fsck_lfs if run in interactive mode prompt
before running the roll-forward pass (pass 6).  It's not always the
case that one wants to roll forward when using fsck to try to repair
a filesystem.  Also, if I understand correctly, at least one bug is
still suspected in the roll- forward code.

Comments?


Index: main.c
===================================================================
RCS file: /cvsroot/src/sbin/fsck_lfs/main.c,v
retrieving revision 1.31
diff -c -r1.31 main.c
*** main.c	9 Nov 2006 19:36:36 -0000	1.31
--- main.c	28 Nov 2006 07:18:43 -0000
***************
*** 258,266 ****
  	}
  
  	if (!rerun) {
! 		if (!preen)
! 			printf("** Phase 6 - Roll Forward\n");
! 		pass6();
  	}
  	zlnhead = (struct zlncnt *) 0;
  	orphead = (struct zlncnt *) 0;
--- 258,272 ----
  	}
  
  	if (!rerun) {
! 		if (!preen) {
! 			if (reply("ROLL FILESYSTEM FORWARD") == 1) {
! 				printf("** Phase 6 - Roll Forward\n");
! 				pass6();
! 			}
! 		}
! 		else {
! 			pass6();
! 		}
  	}
  	zlnhead = (struct zlncnt *) 0;
  	orphead = (struct zlncnt *) 0;