diff --git a/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp b/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp
index e94b020..509cd91 100644
a
|
b
|
|
22 | 22 | #include "PartitionMapParser.h" |
23 | 23 | |
24 | 24 | |
25 | | //#define TRACE_ENABLED |
| 25 | #define TRACE_ENABLED |
26 | 26 | #ifdef TRACE_ENABLED |
27 | 27 | # ifdef _USER_MODE |
28 | 28 | # define TRACE(x) printf x |
… |
… |
PartitionMapParser::_ReadPartitionTable(off_t offset, partition_table* table)
|
309 | 309 | TRACE(("intel: _ReadPartitionTable(): reading the partition table " |
310 | 310 | "failed: %lx\n", error)); |
311 | 311 | } |
| 312 | //check for GPT signature "EFI PART" |
| 313 | //located in the 8bytes following the mbr |
| 314 | char gptSignature[8] = {0}; |
| 315 | if (read_pos(fDeviceFD, fSessionOffset + sizeof(partition_table), &gptSignature, kGPTSignatureSize) != kGPTSignatureSize) { |
| 316 | #ifndef _BOOT_MODE |
| 317 | error = errno; |
| 318 | if (error == B_OK) |
| 319 | error = B_IO_ERROR; |
| 320 | #else |
| 321 | error = B_IO_ERROR; |
| 322 | #endif |
| 323 | TRACE(("intel: _ReadPartitionTable(): checking for GPT signature " |
| 324 | "failed: %lx\n", error)); |
| 325 | } |
| 326 | if( strcmp(gptSignature, "EFI PART") == 0) |
| 327 | { |
| 328 | TRACE(("intel: _ReadPartitionTable(): Disk is formatted as GPT. " |
| 329 | "GPT disks are currently unsupported\n")); |
| 330 | error = B_BAD_DATA; |
| 331 | } |
| 332 | |
312 | 333 | return error; |
313 | 334 | } |
314 | 335 | |
diff --git a/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.h b/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.h
index 7034bac..8ca10ee 100644
a
|
b
|
private:
|
54 | 54 | PartitionMap* fMap; |
55 | 55 | }; |
56 | 56 | |
| 57 | static const int32 kGPTSignatureSize = 8; |
| 58 | |
57 | 59 | #endif // PARTITION_MAP_PARSER_H |