Mods for powerpc.
Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
This commit is contained in:
parent
3088daddf3
commit
ee607da1b8
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,6 +338,20 @@ record_label_chunks(Device **devs, Device *dev)
|
||||
label_chunk_info[j].c = c1;
|
||||
++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
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,6 +338,20 @@ record_label_chunks(Device **devs, Device *dev)
|
||||
label_chunk_info[j].c = c1;
|
||||
++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
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user