Add support for BeFS for EFI GPT and Mac partition table
This commit is contained in:
parent
5a937961e7
commit
40d473abc9
4 changed files with 17 additions and 0 deletions
|
@ -86,5 +86,6 @@ int recover_BeFS(const disk_t *disk_car, const struct disk_super_block *beos_blo
|
|||
set_BeFS_info(beos_block, partition);
|
||||
partition->part_size=le64(beos_block->num_blocks) << le32(beos_block->block_shift);
|
||||
partition->part_type_i386=(unsigned char)P_BEOS;
|
||||
partition->part_type_mac=PMAC_BEOS;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ struct efi_guid_s
|
|||
#define PMAC_FWDRIVER 5
|
||||
#define PMAC_SWAP 0x82
|
||||
#define PMAC_LINUX 0x83
|
||||
#define PMAC_BEOS 0xEB
|
||||
#define PMAC_HFS 0xAF
|
||||
#define PMAC_MAP 6
|
||||
#define PMAC_PATCHES 7
|
||||
|
@ -232,6 +233,9 @@ struct efi_guid_s
|
|||
#define GPT_ENT_TYPE_SOLARIS_RESERVED5 \
|
||||
((const efi_guid_t){le32(0x6a8d2ac7),le16(0x1dd2),le16(0x11b2),0x96,0xa6,{0x08,0x00,0x20,0x73,0x66,0x31}})
|
||||
|
||||
#define GPT_ENT_TYPE_BEOS_BFS \
|
||||
((const efi_guid_t){le32(0x42465331),le16(0x3ba3),le16(0x10f1),0x80,0x2a,{0x48,0x61,0x69,0x6b,0x75,0x21}})
|
||||
|
||||
#define TESTDISK_O_RDONLY 00
|
||||
#define TESTDISK_O_RDWR 02
|
||||
#define TESTDISK_O_DIRECT 040000
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "chgtype.h"
|
||||
#include "partgpt.h"
|
||||
#include "savehdr.h"
|
||||
#include "bfs.h"
|
||||
#include "exfat.h"
|
||||
#include "fat.h"
|
||||
#include "hfs.h"
|
||||
|
@ -129,6 +130,7 @@ const struct systypes_gtp gpt_sys_types[] = {
|
|||
{ GPT_ENT_TYPE_SOLARIS_RESERVED3, "Solaris Reserved3" },
|
||||
{ GPT_ENT_TYPE_SOLARIS_RESERVED4, "Solaris Reserved4" },
|
||||
{ GPT_ENT_TYPE_SOLARIS_RESERVED5, "Solaris Reserved5" },
|
||||
{ GPT_ENT_TYPE_BEOS_BFS, "BeFS"},
|
||||
{ GPT_ENT_TYPE_UNUSED, NULL }
|
||||
};
|
||||
|
||||
|
@ -501,6 +503,12 @@ static int check_part_gpt(disk_t *disk, const int verbose,partition_t *partition
|
|||
if(ret!=0)
|
||||
screen_buffer_add("No HFS or HFS+ structure\n");
|
||||
}
|
||||
else if(guid_cmp(partition->part_type_gpt, GPT_ENT_TYPE_BEOS_BFS)==0)
|
||||
{
|
||||
ret=check_BeFS(disk, partition);
|
||||
if(ret!=0)
|
||||
screen_buffer_add("No BFS structure\n");
|
||||
}
|
||||
log_set_levels(old_levels);
|
||||
if(ret!=0)
|
||||
{
|
||||
|
|
|
@ -68,6 +68,7 @@ static const struct systypes mac_sys_types[] = {
|
|||
{ PMAC_FWDRIVER, "FWDriver" },
|
||||
{ PMAC_SWAP, "Swap" },
|
||||
{ PMAC_LINUX, "Linux" },
|
||||
{ PMAC_BEOS, "BeFS" },
|
||||
{ PMAC_HFS, "HFS" },
|
||||
{ PMAC_MAP, "partition_map" },
|
||||
{ PMAC_PATCHES, "Patches" },
|
||||
|
@ -173,6 +174,8 @@ static list_part_t *read_part_mac(disk_t *disk_car, const int verbose, const int
|
|||
new_partition->part_type_mac=PMAC_MFS;
|
||||
else if(strcmp(dpme->dpme_type,"Apple_PRODOS")==0)
|
||||
new_partition->part_type_mac=PMAC_PRODOS;
|
||||
else if(strcmp(dpme->dpme_type,"Be_BFS")==0)
|
||||
new_partition->part_type_mac=PMAC_BEOS;
|
||||
else if(strcmp(dpme->dpme_type,"DOS_FAT_32")==0)
|
||||
new_partition->part_type_mac=PMAC_FAT32;
|
||||
else
|
||||
|
@ -353,6 +356,7 @@ static int check_part_mac(disk_t *disk_car,const int verbose,partition_t *partit
|
|||
case PMAC_NewWorld:
|
||||
case PMAC_DRIVER:
|
||||
case PMAC_MFS:
|
||||
case PMAC_BEOS:
|
||||
case PMAC_PRODOS:
|
||||
break;
|
||||
case PMAC_LINUX:
|
||||
|
|
Loading…
Reference in a new issue