Partitions are only meaningful for i386 and amd64 architectures, so disable
these code on other architectures.
This commit is contained in:
parent
ae2f8ae4be
commit
9587fe5a7f
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 }
|
||||
},
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user