From nobody@FreeBSD.ORG Tue Dec  7 10:52:51 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 1417C14DA9; Tue,  7 Dec 1999 10:52:51 -0800 (PST)
Message-Id: <19991207185251.1417C14DA9@hub.freebsd.org>
Date: Tue,  7 Dec 1999 10:52:51 -0800 (PST)
From: rich@math.missouri.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: fdformat should exit non-zero when user confirmation fails
X-Send-Pr-Version: www-1.0

>Number:         15339
>Category:       misc
>Synopsis:       fdformat should exit non-zero when user confirmation fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec  7 11:00:01 PST 1999
>Closed-Date:    Wed May 23 13:30:53 PDT 2001
>Last-Modified:  Wed May 23 13:31:13 PDT 2001
>Originator:     richard winkel
>Release:        3.3-stable
>Organization:
umc
>Environment:
FreeBSD crayon 3.3-STABLE FreeBSD 3.3-STABLE #0: Wed Oct 13 15:14:24 CDT 1999     root@crayon:/u2/src/sys/compile/g6_da0_crayon  i386
>Description:
fdformat prompts for user confirmation.  it exits 0 if the user
doesn't confirm, which needlessly complicates scripts.
>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.

>Fix:
Line 292:
if(! yes ()) {
	printf("Not confirmed.\n");
	return 0; /* change to 3, for instance */
}

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed May 23 13:30:53 PDT 2001 
State-Changed-Why:  
Committed, thanks! (and sorry about the delay...) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=15339 
>Unformatted:
