summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-05-15 05:06:19 +0000
committergrehan <grehan@FreeBSD.org>2004-05-15 05:06:19 +0000
commit21c71b3b1218cb8075c4b5b01528402f4cc2aeca (patch)
tree5ee4b8409bdb125c7d27b27b920d1472f39db7a4 /usr.sbin/sysinstall
parentc80c24dad9efebcc776152822c19af55783d4385 (diff)
downloadFreeBSD-src-21c71b3b1218cb8075c4b5b01528402f4cc2aeca.zip
FreeBSD-src-21c71b3b1218cb8075c4b5b01528402f4cc2aeca.tar.gz
Mods for powerpc.
Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/install.c30
-rw-r--r--usr.sbin/sysinstall/label.c30
2 files changed, 50 insertions, 10 deletions
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index a45c3bf..e52d0e2 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -109,11 +109,14 @@ checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vd
if (!disk->chunks)
msgFatal("No chunk list found for %s!", disk->name);
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
-#ifndef __ia64__
- if (c1->type == freebsd) {
+#ifdef __ia64__
+ c2 = c1;
+#elif defined(__powerpc__)
+ if (c1->type == apple) {
for (c2 = c1->part; c2; c2 = c2->next) {
#else
- c2 = c1;
+ if (c1->type == freebsd) {
+ for (c2 = c1->part; c2; c2 = c2->next) {
#endif
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/")) {
@@ -196,11 +199,15 @@ checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vd
if (!disk->chunks)
msgFatal("No chunk list found for %s!", disk->name);
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
-#ifndef __ia64__
- if (c1->type == freebsd) {
+
+#ifdef __ia64__
+ c2 = c1;
+#elif defined(__powerpc__)
+ if (c1->type == apple) {
for (c2 = c1->part; c2; c2 = c2->next) {
#else
- c2 = c1;
+ if (c1->type == freebsd) {
+ for (c2 = c1->part; c2; c2 = c2->next) {
#endif
if (c2->type == part && c2->subtype == FS_SWAP && !swapdev) {
swapdev = c2;
@@ -1036,13 +1043,16 @@ installFilesystems(dialogMenuItem *self)
return DITEM_FAILURE | DITEM_RESTORE;
}
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
-#ifndef __ia64__
- if (c1->type == freebsd) {
- for (c2 = c1->part; c2; c2 = c2->next) {
-#else
+#ifdef __ia64__
if (c1->type == part) {
c2 = c1;
{
+#elif defined(__powerpc__)
+ if (c1->type == apple) {
+ for (c2 = c1->part; c2; c2 = c2->next) {
+#else
+ if (c1->type == freebsd) {
+ for (c2 = c1->part; c2; c2 = c2->next) {
#endif
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
PartInfo *tmp = (PartInfo *)c2->private_data;
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index e75da48..3f27e589 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -290,6 +290,13 @@ record_label_chunks(Device **devs, Device *dev)
label_chunk_info[j].c = c1;
++j;
}
+#ifdef __powerpc__
+ if (c1->type == apple) {
+ label_chunk_info[j].type = PART_SLICE;
+ label_chunk_info[j].c = c1;
+ ++j;
+ }
+#endif
}
}
@@ -332,6 +339,20 @@ record_label_chunks(Device **devs, Device *dev)
++j;
}
#endif
+#ifdef __powerpc__
+ else if (c1->type == apple) {
+ for (c2 = c1->part; c2; c2 = c2->next) {
+ if (c2->type == part) {
+ if (c2->subtype == FS_SWAP)
+ label_chunk_info[j].type = PART_SWAP;
+ else
+ label_chunk_info[j].type = PART_FILESYSTEM;
+ label_chunk_info[j].c = c2;
+ ++j;
+ }
+ }
+ }
+#endif
}
}
label_chunk_info[j].c = NULL;
@@ -1000,6 +1021,12 @@ diskLabel(Device *dev)
char osize[80];
u_long flags = 0;
+#ifdef __powerpc__
+ /* Always use the maximum size for apple partitions */
+ if (label_chunk_info[here].c->type == apple)
+ size = sz;
+ else {
+#endif
sprintf(osize, "%jd", (intmax_t)sz);
val = msgGetInput(osize,
"Please specify the partition size in blocks or append a trailing G for\n"
@@ -1030,6 +1057,9 @@ diskLabel(Device *dev)
clear_wins();
break;
}
+#ifdef __powerpc__
+ }
+#endif
type = get_partition_type();
if (type == PART_NONE) {
clear_wins();
OpenPOWER on IntegriCloud