Bug 15339

Summary: fdformat should exit non-zero when user confirmation fails
Product: Base System Reporter: rich winkel <rich>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description rich winkel 1999-12-07 19:00:01 UTC
fdformat prompts for user confirmation.  it exits 0 if the user
doesn't confirm, which needlessly complicates scripts.

Fix: 

Line 292:
if(! yes ()) {
	printf("Not confirmed.\n");
	return 0; /* change to 3, for instance */
}
How-To-Repeat: in sh:
fdformat -f 1440 /dev/rfd0 && newfs_msdos -f 1440 /dev/rfd0

if user doesn't confirm, newfs_msdos is run anyway.
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-05-23 21:30:53 UTC
State Changed
From-To: open->closed

Committed, thanks! (and sorry about the delay...)