aboutsummaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1998-03-19 15:07:20 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1998-03-19 15:07:20 +0000
commitdf87ad2d33e0a739ced564b3fd50a82111353b97 (patch)
tree27f4b41182cbb66befa132d32084487dfba281e9 /release
parent75ea99e2df84c0de493551bd5b5149e3677d641e (diff)
downloadsrc-df87ad2d33e0a739ced564b3fd50a82111353b97.tar.gz
src-df87ad2d33e0a739ced564b3fd50a82111353b97.zip
correct checks for "already written" case.
Notes
Notes: svn path=/head/; revision=34681
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/disks.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index 78a5ddc894ec..8727f693c548 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.94 1998/02/01 05:58:42 steve Exp $
+ * $Id: disks.c,v 1.95 1998/02/13 08:01:01 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -428,11 +428,7 @@ diskPartition(Device *dev)
break;
case 'W':
- if ((cp = variable_get(DISK_LABELLED)) && !strcmp(cp, "written")) {
- msgConfirm("You've already written this information out - if\n"
- "you wish to overwrite it, you'll have to restart.");
- }
- else if (!msgYesNo("WARNING: This should only be used when modifying an EXISTING\n"
+ if (!msgYesNo("WARNING: This should only be used when modifying an EXISTING\n"
"installation. If you are installing FreeBSD for the first time\n"
"then you should simply type Q when you're finished here and your\n"
"changes will be committed in one batch automatically at the end of\n"
@@ -594,6 +590,7 @@ diskPartitionWrite(dialogMenuItem *self)
{
Device **devs;
int i;
+ char *cp;
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
@@ -602,7 +599,7 @@ diskPartitionWrite(dialogMenuItem *self)
}
if (isDebug())
msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs));
-
+ cp = variable_get(DISK_PARTITIONED);
for (i = 0; devs[i]; i++) {
Chunk *c1;
Disk *d = (Disk *)devs[i]->private;
@@ -616,6 +613,11 @@ diskPartitionWrite(dialogMenuItem *self)
msgConfirm("ERROR: Unable to write data to disk %s!", d->name);
return DITEM_FAILURE;
}
+
+ /* If we've been through here before, we don't need to do the rest */
+ if (cp && !strcmp(cp, "written"))
+ return DITEM_SUCCESS;
+
/* Now scan for bad blocks, if necessary */
for (c1 = d->chunks->part; c1; c1 = c1->next) {
if (c1->flags & CHUNK_BAD144) {