From e97abddfe7ed9337102ef069a4864388b40942e7 Mon Sep 17 00:00:00 2001 From: Tyler Dauwalder Date: Sun, 2 Nov 2003 01:14:18 +0000 Subject: [PATCH] Added more partition map dump output. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5234 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../file_systems/udf/DiskStructures.cpp | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/add-ons/kernel/file_systems/udf/DiskStructures.cpp b/src/add-ons/kernel/file_systems/udf/DiskStructures.cpp index f65b433e0a..d827ca615f 100644 --- a/src/add-ons/kernel/file_systems/udf/DiskStructures.cpp +++ b/src/add-ons/kernel/file_systems/udf/DiskStructures.cpp @@ -370,6 +370,31 @@ udf_logical_descriptor::dump() const DUMP(implementation_use()); PRINT(("integrity_sequence_extent:\n")); DUMP(integrity_sequence_extent()); +// PRINT(("partition_maps:\n")); + const uint8 *maps = partition_maps(); + int offset = 0; + for (uint i = 0; i < partition_map_count(); i++) { + PRINT(("partition_map #%d:\n", i)); + uint8 type = maps[offset]; + uint8 length = maps[offset+1]; + PRINT((" type: %d\n", type)); + PRINT((" length: %d\n", length)); + switch (type) { + case 1: + for (int j = 0; j < length-2; j++) + PRINT((" data[%d]: %d\n", j, maps[offset+2+j])); + break; + case 2: { + PRINT((" partition_number: %d\n", *reinterpret_cast(&(maps[offset+38])))); + PRINT((" entity_id:\n")); + const udf_entity_id *id = reinterpret_cast(&(maps[offset+4])); + if (id) // To kill warning when DEBUG==0 + PDUMP(id); + break; + } + } + offset += maps[offset+1]; + } // \todo dump partition_maps }