Author: nielx Date: 2011-10-30 00:28:11 +0200 (Sun, 30 Oct 2011) New Revision: 42988 Changeset: https://dev.haiku-os.org/changeset/42988 Ticket: https://dev.haiku-os.org/ticket/7015 Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp Log: Apply patch from ticket #7015 (slightly modified) by kallisti: A cosmetic cleanup of the partition types for the Intel partition map. * large number of partition types added (thanks fdisk!) * clean up what partitions can be created Modified: haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp 2011-10-29 22:19:16 UTC (rev 42987) +++ haiku/trunk/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp 2011-10-29 22:28:11 UTC (rev 42988) @@ -50,42 +50,99 @@ static const size_t kUnrecognizedTypeStringLength = 18; static const struct partition_type kPartitionTypes[] = { - // these entries must be sorted by type (currently not) -// TODO: Standardize naming. - { 0x00, "empty", true }, - { 0x01, "FAT 12-bit", false}, - { 0x02, "Xenix root", false }, - { 0x03, "Xenix user", false }, - { 0x04, "FAT 16-bit (dos 3.0)", false }, - { 0x05, /*"Extended Partition"*/INTEL_EXTENDED_PARTITION_NAME, false }, - { 0x06, "FAT 16-bit (dos 3.31)", false }, - { 0x07, "Windows NT, OS/2", true }, - { 0x0b, "FAT 32-bit", false }, - { 0x0c, "FAT 32-bit, LBA-mapped", true }, - { 0x0d, "FAT 16-bit, LBA-mapped", false }, - { 0x0f, /*"Extended Partition, LBA-mapped"*/INTEL_EXTENDED_PARTITION_NAME, - true }, - { 0x42, "Windows 2000 marker (switches to a proprietary partition table)", - false }, - { 0x4d, "QNX 4", true }, - { 0x4e, "QNX 4 2nd part", false }, - { 0x4f, "QNX 4 3rd part", false }, - { 0x78, "XOSL boot loader", false }, - { 0x82, "Linux swapfile", true }, - { 0x83, "Linux native", true }, - { 0x85, /*"Linux extendend partition"*/INTEL_EXTENDED_PARTITION_NAME, - false }, - { 0xa5, "FreeBSD", true }, - { 0xa6, "OpenBSD", true }, - { 0xa7, "NextSTEP", false }, - { 0xa8, "MacOS X", true }, - { 0xa9, "NetBSD", true }, - { 0xab, "MacOS X boot", true }, - { 0xaf, "MacOS X HFS", true }, - { 0xbe, "Solaris 8 boot", false }, - { 0xbf, "Solaris 10", false }, - { 0xeb, /*"BeOS"*/ BFS_NAME, true }, - { 0, NULL, false } + // Can be created (in display order) + { 0x00, "empty", true }, + { 0x0f, INTEL_EXTENDED_PARTITION_NAME, true }, + { 0x0c, "FAT 32-bit, LBA-mapped", true }, + { 0x82, "Linux swap", true }, + { 0x83, "Linux native", true }, + { 0xa5, "FreeBSD", true }, + { 0xa6, "OpenBSD", true }, + { 0xa9, "NetBSD", true }, + { 0xa8, "MacOS X", true }, + { 0xab, "MacOS X boot", true }, + { 0xaf, "MacOS X HFS/HFS+", true }, + { 0x4d, "QNX 4", true }, + { 0xb3, "QNX 6", true }, + { 0xeb, BFS_NAME, true }, + // Known file system types + { 0x01, "FAT 12-bit", false}, + { 0x02, "Xenix root", false }, + { 0x03, "Xenix user", false }, + { 0x04, "FAT 16-bit (dos 3.0)", false }, + { 0x05, INTEL_EXTENDED_PARTITION_NAME, false }, + { 0x06, "FAT 16-bit (dos 3.31)", false }, + { 0x07, "Windows NT, OS/2 IFS, Advanced Unix", false }, + { 0x08, "AIX", false }, + { 0x09, "AIX bootable", false }, + { 0x0a, "OS/2 Boot Manager", false }, + { 0x0b, "FAT 32-bit", false }, + { 0x0e, "FAT 16-bit, LBA-mapped", false }, + { 0x10, "OPUS", false }, + { 0x11, "Hidden FAT 12-bit", false }, + { 0x12, "Compaq diagnostic", false }, + { 0x14, "Hidden FAT 16-bit", false }, + { 0x16, "Hidden FAT 16-bit", false }, + { 0x17, "Hidden HPFS/NTFS", false }, + { 0x18, "AST SmartSleep", false }, + { 0x1b, "Hidden W95 FAT 32-bit", false }, + { 0x1c, "Hidden W95 FAT 32-bit", false }, + { 0x1e, "Hidden W95 FAT 16-bit", false }, + { 0x24, "NEC DOS", false }, + { 0x39, "Plan 9", false }, + { 0x3c, "PartitionMagic", false }, + { 0x40, "Venix 80286", false }, + { 0x41, "PPC PReP Boot", false }, + { 0x42, "Windows 2000 marker (proprietary extended)", + false }, + { 0x4e, "QNX 4 2nd part", false }, + { 0x4f, "QNX 4 3rd part", false }, + { 0x50, "OnTrack DM", false }, + { 0x51, "OnTrack DM6 Aux", false }, + { 0x52, "CP/M", false }, + { 0x53, "OnTrack DM6 Aux", false }, + { 0x54, "OnTrack DM6", false }, + { 0x55, "EZ-Drive", false }, + { 0x56, "Golden Bow", false }, + { 0x5c, "Priam Edisk", false }, + { 0x61, "SpeedStor", false }, + { 0x63, "GNU HURD", false }, + { 0x64, "Novell Netware", false }, + { 0x65, "Novell Netware", false }, + { 0x70, "DiskSecure Mult", false }, + { 0x75, "PC/IX", false }, + { 0x78, "XOSL boot loader", false }, + { 0x80, "Old Minix", false }, + { 0x81, "Minix", false }, + { 0x84, "OS/2 hidden", false }, + { 0x85, /*"Linux extendend partition"*/INTEL_EXTENDED_PARTITION_NAME, + false }, + { 0x86, "NTFS volume set", false }, + { 0x87, "NTFS volume set", false }, + { 0x88, "Linux plaintext", false }, + { 0x8e, "Linux LVM", false }, + { 0x93, "Amoeba", false }, + { 0x94, "Amoeba BBT", false }, + { 0x9f, "BSD/OS", false }, + { 0xa0, "IBM Hibernation", false }, + { 0xa7, "NextSTEP", false }, + { 0xb1, "QNX 6", false}, + { 0xb2, "QNX 6", false}, + { 0xb7, "BSDI fs", false }, + { 0xb8, "BSDI swap", false }, + { 0xbe, "Solaris 8 boot", false }, + { 0xbf, "Solaris 10", false }, + { 0xc1, "DR-DOS FAT", false }, + { 0xc4, "DR-DOS FAT", false }, + { 0xc6, "DR-DOS FAT", false }, + { 0xc7, "Syrinx", false }, + { 0xe4, "SpeedStor", false }, + { 0xee, "GPT", false }, + { 0xef, "EFI", false }, + { 0xfb, "VMware VMFS", false }, + { 0xfc, "VMware VMKCORE", false }, + { 0xfd, "Linux raid auto", false }, + { 0, NULL, false } }; static const struct partition_type kPartitionContentTypes[] = {