Partitions are only meaningful for i386 and amd64 architectures, so disable
these code on other architectures.
This commit is contained in:
parent
c7d9f7f033
commit
fd596b5014
@ -74,7 +74,9 @@ static struct chunk *chunk_info[CHUNK_INFO_ENTRIES];
|
|||||||
static int current_chunk;
|
static int current_chunk;
|
||||||
|
|
||||||
static void diskPartitionNonInteractive(Device *dev);
|
static void diskPartitionNonInteractive(Device *dev);
|
||||||
|
#if defined(__i386__) || defined(__amd64__) /* only meaningful on x86 */
|
||||||
static u_char * bootalloc(char *name, size_t *size);
|
static u_char * bootalloc(char *name, size_t *size);
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
record_chunks(Disk *d)
|
record_chunks(Disk *d)
|
||||||
@ -714,6 +716,7 @@ diskPartition(Device *dev)
|
|||||||
}
|
}
|
||||||
#endif /* WITH_SLICES */
|
#endif /* WITH_SLICES */
|
||||||
|
|
||||||
|
#if defined(__i386__) || defined(__amd64__) /* only meaningful on x86 */
|
||||||
static u_char *
|
static u_char *
|
||||||
bootalloc(char *name, size_t *size)
|
bootalloc(char *name, size_t *size)
|
||||||
{
|
{
|
||||||
@ -746,6 +749,7 @@ bootalloc(char *name, size_t *size)
|
|||||||
msgDebug("bootalloc: can't stat %s\n", buf);
|
msgDebug("bootalloc: can't stat %s\n", buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif /* __i386__ || __amd64 */
|
||||||
|
|
||||||
#ifdef WITH_SLICES
|
#ifdef WITH_SLICES
|
||||||
static int
|
static int
|
||||||
@ -856,7 +860,9 @@ diskPartitionWrite(dialogMenuItem *self)
|
|||||||
msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs));
|
msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs));
|
||||||
for (i = 0; devs[i]; i++) {
|
for (i = 0; devs[i]; i++) {
|
||||||
Disk *d = (Disk *)devs[i]->private;
|
Disk *d = (Disk *)devs[i]->private;
|
||||||
|
#if !defined(__ia64__)
|
||||||
static u_char *boot1;
|
static u_char *boot1;
|
||||||
|
#endif
|
||||||
#if defined(__i386__) || defined(__amd64__)
|
#if defined(__i386__) || defined(__amd64__)
|
||||||
static u_char *boot2;
|
static u_char *boot2;
|
||||||
#endif
|
#endif
|
||||||
|
@ -203,9 +203,7 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
}
|
}
|
||||||
#if defined(__ia64__)
|
#if defined(__ia64__)
|
||||||
else if (c1->type == efi && c1->private_data) {
|
else if (c1->type == efi && c1->private_data) {
|
||||||
char bootdir[FILENAME_MAX];
|
|
||||||
PartInfo *pi = (PartInfo *)c1->private_data;
|
PartInfo *pi = (PartInfo *)c1->private_data;
|
||||||
char *p;
|
|
||||||
|
|
||||||
sprintf(dname, "/dev/%s", c1->name);
|
sprintf(dname, "/dev/%s", c1->name);
|
||||||
|
|
||||||
@ -213,8 +211,6 @@ installFilesystems(dialogMenuItem *self)
|
|||||||
!msgNoYes("You are upgrading - are you SURE you want to "
|
!msgNoYes("You are upgrading - are you SURE you want to "
|
||||||
"newfs /dev/%s?", c1->name)))
|
"newfs /dev/%s?", c1->name)))
|
||||||
performNewfs(pi, dname, QUEUE_YES);
|
performNewfs(pi, dname, QUEUE_YES);
|
||||||
|
|
||||||
command_func_add(pi->mountpoint, Mount_msdosfs, c1->name);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,9 @@ DMenu MenuMain = {
|
|||||||
"DISKUTIL",
|
"DISKUTIL",
|
||||||
"main",
|
"main",
|
||||||
{
|
{
|
||||||
|
#ifdef WITH_SLICES
|
||||||
{ "1 Partition", "Managing disk partitions", NULL, diskPartitionEditor, NULL, NULL, 0, 0, 0, 0 },
|
{ "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 },
|
{ "2 Label", "Label allocated disk partitions", NULL, diskLabelEditor, NULL, NULL, 0, 0, 0, 0 },
|
||||||
{ NULL, NULL, NULL, NULL, 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;
|
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 *
|
WINDOW *
|
||||||
openLayoutDialog(char *helpfile, char *title, int x, int y, int width, int height)
|
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(char *);
|
||||||
extern int Mkdir_command(char *key, void *data);
|
extern int Mkdir_command(char *key, void *data);
|
||||||
extern int Mount(char *, 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 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 ComposeObj *initLayoutDialog(WINDOW *win, Layout *layout, int x, int y, int *max);
|
||||||
extern int layoutDialogLoop(WINDOW *win, Layout *layout, ComposeObj **obj,
|
extern int layoutDialogLoop(WINDOW *win, Layout *layout, ComposeObj **obj,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user