-/* $OpenBSD: subr_disk.c,v 1.238 2021/01/19 19:36:48 mvs Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.239 2021/05/08 16:41:24 krw Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
{
static int init = 0;
static struct uuid uuid_openbsd, uuid_msdos, uuid_chromefs,
- uuid_linux, uuid_hfs, uuid_unused, uuid_efi_system;
+ uuid_linux, uuid_hfs, uuid_unused, uuid_efi_system, uuid_bios_boot;
static const uint8_t gpt_uuid_openbsd[] = GPT_UUID_OPENBSD;
static const uint8_t gpt_uuid_msdos[] = GPT_UUID_MSDOS;
static const uint8_t gpt_uuid_chromerootfs[] = GPT_UUID_CHROMEROOTFS;
static const uint8_t gpt_uuid_hfs[] = GPT_UUID_APPLE_HFS;
static const uint8_t gpt_uuid_unused[] = GPT_UUID_UNUSED;
static const uint8_t gpt_uuid_efi_system[] = GPT_UUID_EFI_SYSTEM;
+ static const uint8_t gpt_uuid_bios_boot[] = GPT_UUID_BIOS_BOOT;
if (init == 0) {
uuid_dec_be(gpt_uuid_openbsd, &uuid_openbsd);
uuid_dec_be(gpt_uuid_hfs, &uuid_hfs);
uuid_dec_be(gpt_uuid_unused, &uuid_unused);
uuid_dec_be(gpt_uuid_efi_system, &uuid_efi_system);
+ uuid_dec_be(gpt_uuid_bios_boot, &uuid_bios_boot);
init = 1;
}
return FS_HFS;
else if (!memcmp(uuid_part, &uuid_efi_system, sizeof(struct uuid)))
return FS_MSDOS;
+ else if (!memcmp(uuid_part, &uuid_bios_boot, sizeof(struct uuid)))
+ return FS_BOOT;
else
return FS_OTHER;
}
-/* $OpenBSD: disklabel.h,v 1.77 2020/11/14 20:53:31 guenther Exp $ */
+/* $OpenBSD: disklabel.h,v 1.78 2021/05/08 16:41:25 krw Exp $ */
/* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */
/*
#define GPT_UUID_APPLE_UFS \
{ 0x55, 0x46, 0x53, 0x00, 0x00, 0x00, 0x11, 0xaa, \
0xaa, 0x11, 0x00, 0x30, 0x65, 0x43, 0xec, 0xac }
+#define GPT_UUID_BIOS_BOOT \
+ { 0x21, 0x68, 0x61, 0x48, 0x64, 0x49, 0x6e, 0x6f, \
+ 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 }
/* DOS partition table -- located at start of some disks. */
#define DOS_LABELSECTOR 1