From f76e12575fa9a5cbc6ed3efd9dd9c108757bae56 Mon Sep 17 00:00:00 2001 From: marcel Date: Wed, 13 Nov 2002 05:39:59 +0000 Subject: 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. --- usr.sbin/sade/config.c | 9 ++++++--- usr.sbin/sade/devices.c | 2 +- usr.sbin/sade/disks.c | 2 ++ usr.sbin/sade/install.c | 2 +- usr.sbin/sade/label.c | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) (limited to 'usr.sbin/sade') diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 167927a..6536de7 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -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; } } diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c index c9038db..e675ae1 100644 --- a/usr.sbin/sade/devices.c +++ b/usr.sbin/sade/devices.c @@ -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]; diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index 4122b70..c97e155 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -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; diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 52fe118..52cc632 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -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); diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index a52ea63..62f0024 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -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; -- cgit v1.1