summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-03-19 15:07:20 +0000
committerjkh <jkh@FreeBSD.org>1998-03-19 15:07:20 +0000
commit9b84fa11077f4c335aa9030bef5a91d32ae3edae (patch)
tree5a2aa2cfad7417b4170135e85c784b3e71062e4c /release
parent336f2b1796b18df6c2d8b9191d61ee198f6d951b (diff)
downloadFreeBSD-src-9b84fa11077f4c335aa9030bef5a91d32ae3edae.zip
FreeBSD-src-9b84fa11077f4c335aa9030bef5a91d32ae3edae.tar.gz
correct checks for "already written" case.
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 78a5ddc..8727f69 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) {
OpenPOWER on IntegriCloud