Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  7 Dec 1999 10:52:51 -0800 (PST)
From:      rich@math.missouri.edu
To:        freebsd-gnats-submit@freebsd.org
Subject:   misc/15339: fdformat should exit non-zero when user confirmation fails
Message-ID:  <19991207185251.1417C14DA9@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec  7 11:00:01 PST 1999
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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