summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/sade/disks.c14
-rw-r--r--usr.sbin/sade/install.c14
-rw-r--r--usr.sbin/sade/label.c10
-rw-r--r--usr.sbin/sade/main.c2
-rw-r--r--usr.sbin/sade/menus.c13
-rw-r--r--usr.sbin/sade/system.c2
-rw-r--r--usr.sbin/sysinstall/cdrom.c2
-rw-r--r--usr.sbin/sysinstall/disks.c14
-rw-r--r--usr.sbin/sysinstall/install.c14
-rw-r--r--usr.sbin/sysinstall/label.c10
-rw-r--r--usr.sbin/sysinstall/main.c2
-rw-r--r--usr.sbin/sysinstall/menus.c13
-rw-r--r--usr.sbin/sysinstall/system.c2
13 files changed, 60 insertions, 52 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index 59f2ad2..992512b 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -368,7 +368,7 @@ diskPartition(Device *dev)
case 'A':
case 'F': /* Undocumented magic Dangerously Dedicated mode */
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
rv = 1;
#else /* The rest is only relevant on x86 */
cp = variable_get(VAR_DEDICATE_DISK);
@@ -442,7 +442,7 @@ diskPartition(Device *dev)
partitiontype = fat;
else
partitiontype = unknown;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
if (partitiontype == freebsd && size == chunk_info[current_chunk]->size)
All_FreeBSD(d, 1);
else
@@ -816,20 +816,20 @@ diskPartitionWrite(dialogMenuItem *self)
for (i = 0; devs[i]; i++) {
Disk *d = (Disk *)devs[i]->private;
static u_char *boot1;
-#ifndef __alpha__
+#if defined(__i386__) || defined(__ia64__)
static u_char *boot2;
#endif
if (!devs[i]->enabled)
continue;
-#ifdef __alpha__
- if (!boot1) boot1 = bootalloc("boot1", NULL);
- Set_Boot_Blocks(d, boot1, NULL);
-#else
+#if defined(__i386__) || defined(__ia64__)
if (!boot1) boot1 = bootalloc("boot1", NULL);
if (!boot2) boot2 = bootalloc("boot2", NULL);
Set_Boot_Blocks(d, boot1, boot2);
+#else
+ if (!boot1) boot1 = bootalloc("boot1", NULL);
+ Set_Boot_Blocks(d, boot1, NULL);
#endif
msgNotify("Writing partition information to drive %s", d->name);
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 9ab38a4..8cfc955 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -518,7 +518,7 @@ installExpress(dialogMenuItem *self)
dialog_clear_norefresh();
variable_set2(SYSTEM_STATE, "express", 0);
-#ifndef __alpha__
+#if defined(__i386__) || defined(__ia64__)
if (DITEM_STATUS((i = diskPartitionEditor(self))) == DITEM_FAILURE)
return i;
#endif
@@ -546,7 +546,7 @@ installStandard(dialogMenuItem *self)
variable_set2(SYSTEM_STATE, "standard", 0);
dialog_clear_norefresh();
-#ifndef __alpha__
+#if defined(__i386__) || defined(__ia64__)
msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
"scheme for your hard disk. If you simply wish to devote all disk space\n"
"to FreeBSD (overwriting anything else that might be on the disk(s) selected)\n"
@@ -566,16 +566,16 @@ nodisks:
}
#endif
-#ifdef __alpha__
- msgConfirm("Now you need to create BSD partitions on the disk which you are\n"
- "installing to. If you have a reasonable amount of disk space (200MB or more)\n"
+#if defined(__i386__) || defined(__ia64__)
+ msgConfirm("Now you need to create BSD partitions inside of the fdisk partition(s)\n"
+ "just created. If you have a reasonable amount of disk space (200MB or more)\n"
"and don't have any special requirements, simply use the (A)uto command to\n"
"allocate space automatically. If you have more specific needs or just don't\n"
"care for the layout chosen by (A)uto, press F1 for more information on\n"
"manual layout.");
#else
- msgConfirm("Now you need to create BSD partitions inside of the fdisk partition(s)\n"
- "just created. If you have a reasonable amount of disk space (200MB or more)\n"
+ msgConfirm("Now you need to create BSD partitions on the disk which you are\n"
+ "installing to. If you have a reasonable amount of disk space (200MB or more)\n"
"and don't have any special requirements, simply use the (A)uto command to\n"
"allocate space automatically. If you have more specific needs or just don't\n"
"care for the layout chosen by (A)uto, press F1 for more information on\n"
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index f40f3ae..bf4518d 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -59,7 +59,7 @@
/*
* Minimum partition sizes
*/
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__)
#define ROOT_MIN_SIZE 40
#else
#define ROOT_MIN_SIZE 30
@@ -679,7 +679,7 @@ clear_wins(void)
print_label_chunks();
}
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
/*
* If there isn't a freebsd chunk already (i.e. there is no label),
@@ -712,7 +712,7 @@ diskLabel(Device *dev)
PartInfo *p, *oldp;
PartType type;
Device **devs;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
int i;
#endif
WINDOW *w = savescr();
@@ -729,7 +729,7 @@ diskLabel(Device *dev)
}
labeling = TRUE;
keypad(stdscr, TRUE);
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
for (i = 0; devs[i]; i++) {
maybe_dedicate((Disk*) devs[i]->private);
}
@@ -1381,7 +1381,7 @@ diskLabelNonInteractive(Device *dev)
d = dev->private;
else
d = devs[0]->private;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
maybe_dedicate(d);
#endif
record_label_chunks(devs, dev);
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index 144a617..b9ac365 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -162,7 +162,7 @@ main(int argc, char **argv)
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE);
if (getpid() != 1
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
|| !msgNoYes("Are you sure you wish to exit? The system will halt.")
#else
|| !msgNoYes("Are you sure you wish to exit? The system will reboot\n"
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 6bd7d9f..7b5bd15 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -1182,7 +1182,7 @@ DMenu MenuInstallCustom = {
"INSTALL",
{ { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
{ "2 Options", "View/Set various installation options", NULL, optionsEditor },
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
{ "3 Label", "Label disk partitions", NULL, diskLabelEditor },
{ "4 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
{ "5 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
@@ -1320,14 +1320,17 @@ DMenu MenuStartup = {
dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" },
{ " lpd", "This host has a printer and wants to run lpd.",
dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" },
-#ifdef __i386__
{ " linux", "This host wants to be able to run linux binaries.",
dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
- { " SVR4", "This host wants to be able to run SVR4 binaries.",
- dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
+#ifdef __i386__
{ " SCO", "This host wants to be able to run IBCS2 binaries.",
dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
-#elif __alpha__
+#endif
+#if defined(__i386__) || defined(__sparc64__)
+ { " SVR4", "This host wants to be able to run SVR4 binaries.",
+ dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
+#endif
+#ifdef __alpha__
{ " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.",
dmenuVarCheck, dmenuToggleVariable, NULL, "osf1_enable=YES" },
#endif
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index 07fc2b0..25ab8b1 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -253,7 +253,7 @@ systemShutdown(int status)
if (RunningAsInit) {
/* Put the console back */
ioctl(0, VT_ACTIVATE, 2);
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
reboot(RB_HALT);
#else
reboot(0);
diff --git a/usr.sbin/sysinstall/cdrom.c b/usr.sbin/sysinstall/cdrom.c
index 3b55be7..d6fd7b8 100644
--- a/usr.sbin/sysinstall/cdrom.c
+++ b/usr.sbin/sysinstall/cdrom.c
@@ -155,6 +155,8 @@ mediaInitCDROM(Device *dev)
if (strcmp(cp, "any") &&
#ifdef __alpha__
strcmp(cp, "alpha")) {
+#elif defined(__sparc64__)
+ strcmp(cp, "sparc64")) {
#else
strcmp(cp, "x86")) {
#endif
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index 59f2ad2..992512b 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -368,7 +368,7 @@ diskPartition(Device *dev)
case 'A':
case 'F': /* Undocumented magic Dangerously Dedicated mode */
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
rv = 1;
#else /* The rest is only relevant on x86 */
cp = variable_get(VAR_DEDICATE_DISK);
@@ -442,7 +442,7 @@ diskPartition(Device *dev)
partitiontype = fat;
else
partitiontype = unknown;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
if (partitiontype == freebsd && size == chunk_info[current_chunk]->size)
All_FreeBSD(d, 1);
else
@@ -816,20 +816,20 @@ diskPartitionWrite(dialogMenuItem *self)
for (i = 0; devs[i]; i++) {
Disk *d = (Disk *)devs[i]->private;
static u_char *boot1;
-#ifndef __alpha__
+#if defined(__i386__) || defined(__ia64__)
static u_char *boot2;
#endif
if (!devs[i]->enabled)
continue;
-#ifdef __alpha__
- if (!boot1) boot1 = bootalloc("boot1", NULL);
- Set_Boot_Blocks(d, boot1, NULL);
-#else
+#if defined(__i386__) || defined(__ia64__)
if (!boot1) boot1 = bootalloc("boot1", NULL);
if (!boot2) boot2 = bootalloc("boot2", NULL);
Set_Boot_Blocks(d, boot1, boot2);
+#else
+ if (!boot1) boot1 = bootalloc("boot1", NULL);
+ Set_Boot_Blocks(d, boot1, NULL);
#endif
msgNotify("Writing partition information to drive %s", d->name);
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 9ab38a4..8cfc955 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -518,7 +518,7 @@ installExpress(dialogMenuItem *self)
dialog_clear_norefresh();
variable_set2(SYSTEM_STATE, "express", 0);
-#ifndef __alpha__
+#if defined(__i386__) || defined(__ia64__)
if (DITEM_STATUS((i = diskPartitionEditor(self))) == DITEM_FAILURE)
return i;
#endif
@@ -546,7 +546,7 @@ installStandard(dialogMenuItem *self)
variable_set2(SYSTEM_STATE, "standard", 0);
dialog_clear_norefresh();
-#ifndef __alpha__
+#if defined(__i386__) || defined(__ia64__)
msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
"scheme for your hard disk. If you simply wish to devote all disk space\n"
"to FreeBSD (overwriting anything else that might be on the disk(s) selected)\n"
@@ -566,16 +566,16 @@ nodisks:
}
#endif
-#ifdef __alpha__
- msgConfirm("Now you need to create BSD partitions on the disk which you are\n"
- "installing to. If you have a reasonable amount of disk space (200MB or more)\n"
+#if defined(__i386__) || defined(__ia64__)
+ msgConfirm("Now you need to create BSD partitions inside of the fdisk partition(s)\n"
+ "just created. If you have a reasonable amount of disk space (200MB or more)\n"
"and don't have any special requirements, simply use the (A)uto command to\n"
"allocate space automatically. If you have more specific needs or just don't\n"
"care for the layout chosen by (A)uto, press F1 for more information on\n"
"manual layout.");
#else
- msgConfirm("Now you need to create BSD partitions inside of the fdisk partition(s)\n"
- "just created. If you have a reasonable amount of disk space (200MB or more)\n"
+ msgConfirm("Now you need to create BSD partitions on the disk which you are\n"
+ "installing to. If you have a reasonable amount of disk space (200MB or more)\n"
"and don't have any special requirements, simply use the (A)uto command to\n"
"allocate space automatically. If you have more specific needs or just don't\n"
"care for the layout chosen by (A)uto, press F1 for more information on\n"
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index f40f3ae..bf4518d 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -59,7 +59,7 @@
/*
* Minimum partition sizes
*/
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__)
#define ROOT_MIN_SIZE 40
#else
#define ROOT_MIN_SIZE 30
@@ -679,7 +679,7 @@ clear_wins(void)
print_label_chunks();
}
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
/*
* If there isn't a freebsd chunk already (i.e. there is no label),
@@ -712,7 +712,7 @@ diskLabel(Device *dev)
PartInfo *p, *oldp;
PartType type;
Device **devs;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
int i;
#endif
WINDOW *w = savescr();
@@ -729,7 +729,7 @@ diskLabel(Device *dev)
}
labeling = TRUE;
keypad(stdscr, TRUE);
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
for (i = 0; devs[i]; i++) {
maybe_dedicate((Disk*) devs[i]->private);
}
@@ -1381,7 +1381,7 @@ diskLabelNonInteractive(Device *dev)
d = dev->private;
else
d = devs[0]->private;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
maybe_dedicate(d);
#endif
record_label_chunks(devs, dev);
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index 144a617..b9ac365 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.c
@@ -162,7 +162,7 @@ main(int argc, char **argv)
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE);
if (getpid() != 1
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
|| !msgNoYes("Are you sure you wish to exit? The system will halt.")
#else
|| !msgNoYes("Are you sure you wish to exit? The system will reboot\n"
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 6bd7d9f..7b5bd15 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -1182,7 +1182,7 @@ DMenu MenuInstallCustom = {
"INSTALL",
{ { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
{ "2 Options", "View/Set various installation options", NULL, optionsEditor },
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
{ "3 Label", "Label disk partitions", NULL, diskLabelEditor },
{ "4 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
{ "5 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
@@ -1320,14 +1320,17 @@ DMenu MenuStartup = {
dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" },
{ " lpd", "This host has a printer and wants to run lpd.",
dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" },
-#ifdef __i386__
{ " linux", "This host wants to be able to run linux binaries.",
dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
- { " SVR4", "This host wants to be able to run SVR4 binaries.",
- dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
+#ifdef __i386__
{ " SCO", "This host wants to be able to run IBCS2 binaries.",
dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
-#elif __alpha__
+#endif
+#if defined(__i386__) || defined(__sparc64__)
+ { " SVR4", "This host wants to be able to run SVR4 binaries.",
+ dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
+#endif
+#ifdef __alpha__
{ " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.",
dmenuVarCheck, dmenuToggleVariable, NULL, "osf1_enable=YES" },
#endif
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index 07fc2b0..25ab8b1 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -253,7 +253,7 @@ systemShutdown(int status)
if (RunningAsInit) {
/* Put the console back */
ioctl(0, VT_ACTIVATE, 2);
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__sparc64__)
reboot(RB_HALT);
#else
reboot(0);
OpenPOWER on IntegriCloud