From 7ba970b9cc27b16d9c2c447530113795a931c890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 10 May 2009 09:00:19 +0000 Subject: [PATCH] Added optional tracing facilities. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30690 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../disk_systems/intel/ExtendedPartitionAddOn.cpp | 14 ++++++++++++-- .../disk_systems/intel/PartitionMapAddOn.cpp | 12 ++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp b/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp index 10bf29cbb9..9c551be3e2 100644 --- a/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp +++ b/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp @@ -5,9 +5,8 @@ #include "ExtendedPartitionAddOn.h" -#include - #include +#include #include #include @@ -17,6 +16,14 @@ #include "IntelDiskSystem.h" +//#define TRACE_EXTENDED_PARTITION_ADD_ON +#undef TRACE +#ifdef TRACE_EXTENDED_PARTITION_ADD_ON +# define TRACE(x...) printf(x) +#else +# define TRACE(x...) do {} while (false) +#endif + using std::nothrow; @@ -244,6 +251,9 @@ status_t ExtendedPartitionHandle::GetNextSupportedType(const BMutablePartition* child, int32* cookie, BString* type) { + TRACE("%p->ExtendedPartitionHandle::GetNextSupportedType(child: %p, " + "cookie: %ld)\n", this, child, *cookie); + if (*cookie != 0) return B_ENTRY_NOT_FOUND; *cookie = *cookie + 1; diff --git a/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp b/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp index 637444c8e1..966e90c81e 100644 --- a/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp +++ b/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp @@ -6,6 +6,7 @@ #include "PartitionMapAddOn.h" #include +#include #include #include @@ -16,6 +17,15 @@ #include "IntelDiskSystem.h" +//#define TRACE_PARTITION_MAP_ADD_ON +#undef TRACE +#ifdef TRACE_PARTITION_MAP_ADD_ON +# define TRACE(x...) printf(x) +#else +# define TRACE(x...) do {} while (false) +#endif + + using std::nothrow; @@ -251,6 +261,8 @@ status_t PartitionMapHandle::GetNextSupportedType(const BMutablePartition* child, int32* cookie, BString* type) { + TRACE("%p->PartitionMapHandle::GetNextSupportedType(child: %p, " + "cookie: %ld)\n", this, child, *cookie); // TODO: What are we supposed to do with the child? // we support creating two types, primary and extended