summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/label.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-01-29 11:39:04 +0000
committerjkh <jkh@FreeBSD.org>1999-01-29 11:39:04 +0000
commitd5f0625dc51c4fe1f64677e63d3fc482992a9c25 (patch)
tree21626d0e91e40224e09056a805bf8e879126b1ff /usr.sbin/sade/label.c
parentcc48c70aca802844f758f365a4d8c646024c339a (diff)
downloadFreeBSD-src-d5f0625dc51c4fe1f64677e63d3fc482992a9c25.zip
FreeBSD-src-d5f0625dc51c4fe1f64677e63d3fc482992a9c25.tar.gz
More support for Alpha installs.
Submitted by: dfr
Diffstat (limited to 'usr.sbin/sade/label.c')
-rw-r--r--usr.sbin/sade/label.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index ea49bbe..c43c5f6 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.83 1998/07/18 09:42:01 jkh Exp $
+ * $Id: label.c,v 1.84 1999/01/08 00:14:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -644,6 +644,30 @@ clear_wins(void)
print_label_chunks();
}
+#ifdef __alpha__
+
+/*
+ * If there isn't a freebsd chunk already (i.e. there is no label),
+ * dedicate the disk.
+ */
+static void
+maybe_dedicate(Disk* d)
+{
+ struct chunk *c;
+
+ for (c = d->chunks->part; c; c = c->next) {
+ if (c->type == freebsd)
+ break;
+ }
+
+ if (!c) {
+ msgDebug("dedicating disk");
+ All_FreeBSD(d, 1);
+ }
+}
+
+#endif
+
static int
diskLabel(Device *dev)
{
@@ -670,7 +694,7 @@ diskLabel(Device *dev)
keypad(stdscr, TRUE);
#ifdef __alpha__
for (i = 0; devs[i]; i++) {
- All_FreeBSD((Disk*) devs[i]->private, 1);
+ maybe_dedicate((Disk*) devs[i]->private);
}
#endif
record_label_chunks(devs, dev);
@@ -1169,7 +1193,7 @@ diskLabelNonInteractive(Device *dev)
else
d = devs[0]->private;
#ifdef __alpha__
- All_FreeBSD(d, 1);
+ maybe_dedicate(d);
#endif
record_label_chunks(devs, dev);
for (i = 0; label_chunk_info[i].c; i++) {
OpenPOWER on IntegriCloud