Also test for type efi everywhere we currently test for type fat.
With this change there's no a priori difference between EFI and FAT partitions. With this change and the corresponding change to libdisk, we can create EFI partitions, just like regular FAT partitions.
This commit is contained in:
parent
c02d224c79
commit
f76e12575f
@ -113,7 +113,7 @@ mount_point(Chunk *c1)
|
||||
{
|
||||
if (c1->type == part && c1->subtype == FS_SWAP)
|
||||
return "none";
|
||||
else if (c1->type == part || c1->type == fat)
|
||||
else if (c1->type == part || c1->type == fat || c1->type == efi)
|
||||
return ((PartInfo *)c1->private_data)->mountpoint;
|
||||
return "/bogus";
|
||||
}
|
||||
@ -121,7 +121,7 @@ mount_point(Chunk *c1)
|
||||
static char *
|
||||
fstype(Chunk *c1)
|
||||
{
|
||||
if (c1->type == fat)
|
||||
if (c1->type == fat || c1->type == efi)
|
||||
return "msdosfs";
|
||||
else if (c1->type == part) {
|
||||
if (c1->subtype != FS_SWAP)
|
||||
@ -151,6 +151,9 @@ fstype_short(Chunk *c1)
|
||||
else
|
||||
return "ro";
|
||||
}
|
||||
else if (c1->type == efi)
|
||||
return "rw";
|
||||
|
||||
return "bog";
|
||||
}
|
||||
|
||||
@ -208,7 +211,7 @@ configFstab(dialogMenuItem *self)
|
||||
chunk_list[nchunks++] = c2;
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat && c1->private_data)
|
||||
else if ((c1->type == fat || c1->type == efi) && c1->private_data)
|
||||
chunk_list[nchunks++] = c1;
|
||||
}
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ skipif:
|
||||
|
||||
/* Look for existing DOS partitions to register as "DOS media devices" */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == fat || c1->type == extended) {
|
||||
if (c1->type == fat || c1->type == efi || c1->type == extended) {
|
||||
Device *dev;
|
||||
char devname[80];
|
||||
|
||||
|
@ -508,6 +508,8 @@ diskPartition(Device *dev)
|
||||
partitiontype = freebsd;
|
||||
else if (subtype == SUBTYPE_FAT)
|
||||
partitiontype = fat;
|
||||
else if (subtype == SUBTYPE_EFI)
|
||||
partitiontype = efi;
|
||||
else
|
||||
partitiontype = unknown;
|
||||
chunk_info[current_chunk]->type = partitiontype;
|
||||
|
@ -1038,7 +1038,7 @@ installFilesystems(dialogMenuItem *self)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat && c1->private_data && (root->newfs || upgrade)) {
|
||||
else if ((c1->type == fat || c1->type == efi) && c1->private_data && (root->newfs || upgrade)) {
|
||||
char name[FILENAME_MAX];
|
||||
|
||||
sprintf(name, "%s/%s", RunningAsInit ? "/mnt" : "", ((PartInfo *)c1->private_data)->mountpoint);
|
||||
|
@ -305,7 +305,7 @@ record_label_chunks(Device **devs, Device *dev)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat) {
|
||||
else if (c1->type == fat || c1->type == efi) {
|
||||
label_chunk_info[j].type = PART_FAT;
|
||||
label_chunk_info[j].c = c1;
|
||||
++j;
|
||||
|
@ -113,7 +113,7 @@ mount_point(Chunk *c1)
|
||||
{
|
||||
if (c1->type == part && c1->subtype == FS_SWAP)
|
||||
return "none";
|
||||
else if (c1->type == part || c1->type == fat)
|
||||
else if (c1->type == part || c1->type == fat || c1->type == efi)
|
||||
return ((PartInfo *)c1->private_data)->mountpoint;
|
||||
return "/bogus";
|
||||
}
|
||||
@ -121,7 +121,7 @@ mount_point(Chunk *c1)
|
||||
static char *
|
||||
fstype(Chunk *c1)
|
||||
{
|
||||
if (c1->type == fat)
|
||||
if (c1->type == fat || c1->type == efi)
|
||||
return "msdosfs";
|
||||
else if (c1->type == part) {
|
||||
if (c1->subtype != FS_SWAP)
|
||||
@ -151,6 +151,9 @@ fstype_short(Chunk *c1)
|
||||
else
|
||||
return "ro";
|
||||
}
|
||||
else if (c1->type == efi)
|
||||
return "rw";
|
||||
|
||||
return "bog";
|
||||
}
|
||||
|
||||
@ -208,7 +211,7 @@ configFstab(dialogMenuItem *self)
|
||||
chunk_list[nchunks++] = c2;
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat && c1->private_data)
|
||||
else if ((c1->type == fat || c1->type == efi) && c1->private_data)
|
||||
chunk_list[nchunks++] = c1;
|
||||
}
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ skipif:
|
||||
|
||||
/* Look for existing DOS partitions to register as "DOS media devices" */
|
||||
for (c1 = d->chunks->part; c1; c1 = c1->next) {
|
||||
if (c1->type == fat || c1->type == extended) {
|
||||
if (c1->type == fat || c1->type == efi || c1->type == extended) {
|
||||
Device *dev;
|
||||
char devname[80];
|
||||
|
||||
|
@ -508,6 +508,8 @@ diskPartition(Device *dev)
|
||||
partitiontype = freebsd;
|
||||
else if (subtype == SUBTYPE_FAT)
|
||||
partitiontype = fat;
|
||||
else if (subtype == SUBTYPE_EFI)
|
||||
partitiontype = efi;
|
||||
else
|
||||
partitiontype = unknown;
|
||||
chunk_info[current_chunk]->type = partitiontype;
|
||||
|
@ -1038,7 +1038,7 @@ installFilesystems(dialogMenuItem *self)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat && c1->private_data && (root->newfs || upgrade)) {
|
||||
else if ((c1->type == fat || c1->type == efi) && c1->private_data && (root->newfs || upgrade)) {
|
||||
char name[FILENAME_MAX];
|
||||
|
||||
sprintf(name, "%s/%s", RunningAsInit ? "/mnt" : "", ((PartInfo *)c1->private_data)->mountpoint);
|
||||
|
@ -305,7 +305,7 @@ record_label_chunks(Device **devs, Device *dev)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (c1->type == fat) {
|
||||
else if (c1->type == fat || c1->type == efi) {
|
||||
label_chunk_info[j].type = PART_FAT;
|
||||
label_chunk_info[j].c = c1;
|
||||
++j;
|
||||
|
Loading…
x
Reference in New Issue
Block a user