| Summary: | fdformat should exit non-zero when user confirmation fails | ||
|---|---|---|---|
| Product: | Base System | Reporter: | rich winkel <rich> |
| Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Committed, thanks! (and sorry about the delay...) |
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.