summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2006-08-08 14:28:03 +0000
committerdelphij <delphij@FreeBSD.org>2006-08-08 14:28:03 +0000
commit9587fe5a7f8b7de319a422a48e57f95f3443919c (patch)
treeb6692e4917e73a20e82c1a0f16005d3bf243248c
parentae2f8ae4be9332bd1024da5ecc4d2e3a86015f3b (diff)
downloadFreeBSD-src-9587fe5a7f8b7de319a422a48e57f95f3443919c.zip
FreeBSD-src-9587fe5a7f8b7de319a422a48e57f95f3443919c.tar.gz
Partitions are only meaningful for i386 and amd64 architectures, so disable
these code on other architectures.
-rw-r--r--usr.sbin/sade/disks.c6
-rw-r--r--usr.sbin/sade/install.c4
-rw-r--r--usr.sbin/sade/menus.c2
-rw-r--r--usr.sbin/sade/misc.c40
-rw-r--r--usr.sbin/sade/sade.h1
5 files changed, 8 insertions, 45 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index 9b13725..a6eb6e7 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -74,7 +74,9 @@ static struct chunk *chunk_info[CHUNK_INFO_ENTRIES];
static int current_chunk;
static void diskPartitionNonInteractive(Device *dev);
+#if defined(__i386__) || defined(__amd64__) /* only meaningful on x86 */
static u_char * bootalloc(char *name, size_t *size);
+#endif
static void
record_chunks(Disk *d)
@@ -714,6 +716,7 @@ diskPartition(Device *dev)
}
#endif /* WITH_SLICES */
+#if defined(__i386__) || defined(__amd64__) /* only meaningful on x86 */
static u_char *
bootalloc(char *name, size_t *size)
{
@@ -746,6 +749,7 @@ bootalloc(char *name, size_t *size)
msgDebug("bootalloc: can't stat %s\n", buf);
return NULL;
}
+#endif /* __i386__ || __amd64 */
#ifdef WITH_SLICES
static int
@@ -856,7 +860,9 @@ diskPartitionWrite(dialogMenuItem *self)
msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs));
for (i = 0; devs[i]; i++) {
Disk *d = (Disk *)devs[i]->private;
+#if !defined(__ia64__)
static u_char *boot1;
+#endif
#if defined(__i386__) || defined(__amd64__)
static u_char *boot2;
#endif
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 7a7f960..952ae93 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -203,9 +203,7 @@ installFilesystems(dialogMenuItem *self)
}
#if defined(__ia64__)
else if (c1->type == efi && c1->private_data) {
- char bootdir[FILENAME_MAX];
PartInfo *pi = (PartInfo *)c1->private_data;
- char *p;
sprintf(dname, "/dev/%s", c1->name);
@@ -213,8 +211,6 @@ installFilesystems(dialogMenuItem *self)
!msgNoYes("You are upgrading - are you SURE you want to "
"newfs /dev/%s?", c1->name)))
performNewfs(pi, dname, QUEUE_YES);
-
- command_func_add(pi->mountpoint, Mount_msdosfs, c1->name);
}
#endif
}
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index a7178b4..e039fd2 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -63,7 +63,9 @@ DMenu MenuMain = {
"DISKUTIL",
"main",
{
+#ifdef WITH_SLICES
{ "1 Partition", "Managing disk partitions", NULL, diskPartitionEditor, NULL, NULL, 0, 0, 0, 0 },
+#endif
{ "2 Label", "Label allocated disk partitions", NULL, diskLabelEditor, NULL, NULL, 0, 0, 0, 0 },
{ NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0 }
},
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
index 0eb7363..4730c7f 100644
--- a/usr.sbin/sade/misc.c
+++ b/usr.sbin/sade/misc.c
@@ -352,46 +352,6 @@ Mount(char *mountp, void *dev)
return DITEM_SUCCESS;
}
-#if 0
-int
-Mount_msdosfs(char *mountp, void *dev)
-{
- struct msdosfs_args mount_args;
- char device[80];
- char mountpoint[FILENAME_MAX];
-
- if (Fake)
- return DITEM_SUCCESS;
-
- if (*((char *)dev) != '/') {
- sprintf(device, "/dev/%s", (char *)dev);
- sprintf(mountpoint, "%s", mountp);
- }
- else {
- strcpy(device, dev);
- strcpy(mountpoint, mountp);
- }
-
- if (Mkdir(mountpoint)) {
- msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
- return DITEM_FAILURE;
- }
- if (isDebug())
- msgDebug("mount %s %s\n", device, mountpoint);
-
- memset(&mount_args, 0, sizeof(mount_args));
- mount_args.fspec = device;
- mount_args.magic = MSDOSFS_ARGSMAGIC;
- mount_args.mask = S_IRWXU | S_IRWXG | S_IRWXO;
- if (mount("msdosfs", mountpoint, 0,
- (caddr_t)&mount_args) == -1) {
- msgConfirm("Error mounting %s on %s : %s", device, mountpoint, strerror(errno));
- return DITEM_FAILURE;
- }
- return DITEM_SUCCESS;
-}
-#endif
-
WINDOW *
openLayoutDialog(char *helpfile, char *title, int x, int y, int width, int height)
{
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 9b21494..9e6745e 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -433,7 +433,6 @@ extern void items_free(dialogMenuItem *list, int *curr, int *max);
extern int Mkdir(char *);
extern int Mkdir_command(char *key, void *data);
extern int Mount(char *, void *data);
-extern int Mount_msdosfs(char *mountp, void *devicename);
extern WINDOW *openLayoutDialog(char *helpfile, char *title, int x, int y, int width, int height);
extern ComposeObj *initLayoutDialog(WINDOW *win, Layout *layout, int x, int y, int *max);
extern int layoutDialogLoop(WINDOW *win, Layout *layout, ComposeObj **obj,
OpenPOWER on IntegriCloud