From 8d9e5a451e2fb58549aba969c921614bb15d2607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 29 Sep 2006 13:13:02 +0000 Subject: [PATCH] * Turned on debugging in the Intel partitioning system add-on, and the partition stuff of the boot loader to help with bug #238. * Minor cleanup (added license headers, fixed debug output) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18977 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../partitioning_systems/intel/PartitionMap.cpp | 16 ++++++++++------ .../intel/PartitionMapParser.cpp | 15 +++++++++++---- .../kernel/partitioning_systems/intel/intel.cpp | 16 ++++++++++------ src/system/boot/loader/partitions.cpp | 7 ++++--- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp b/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp index fb7540a75a..34a00d02cb 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp +++ b/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp @@ -1,7 +1,11 @@ -//---------------------------------------------------------------------- -// This software is part of the OpenBeOS distribution and is covered -// by the OpenBeOS license. -//--------------------------------------------------------------------- +/* + * Copyright 2003-2006, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Ingo Weinhold, bonefish@cs.tu-berlin.de + */ + /*! \file PartitionMap.cpp \brief Definitions for "intel" style partitions and implementation @@ -28,8 +32,8 @@ #include "PartitionMap.h" -#define TRACE(x) ; -//#define TRACE(x) dprintf x +//#define TRACE(x) ; +#define TRACE(x) dprintf x using std::nothrow; diff --git a/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp b/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp index d9a9f49fba..b898598d07 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp +++ b/src/add-ons/kernel/partitioning_systems/intel/PartitionMapParser.cpp @@ -1,4 +1,11 @@ -// PartitionMapParser.cpp +/* + * Copyright 2003-2006, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Ingo Weinhold, bonefish@cs.tu-berlin.de + */ + #ifndef _USER_MODE # include @@ -14,8 +21,8 @@ #include "PartitionMap.h" #include "PartitionMapParser.h" -#define TRACE(x) ; -//#define TRACE(x) dprintf x +//#define TRACE(x) ; +#define TRACE(x) dprintf x using std::nothrow; @@ -90,7 +97,7 @@ PartitionMapParser::_ParsePrimary(const partition_table_sector *pts) // ignore, if location is bad if (!partition->CheckLocation(fSessionSize, fBlockSize)) { TRACE(("intel: _ParsePrimary(): partition %ld: bad location, " - "ignoring\n")); + "ignoring\n", i)); partition->Unset(); } } diff --git a/src/add-ons/kernel/partitioning_systems/intel/intel.cpp b/src/add-ons/kernel/partitioning_systems/intel/intel.cpp index 428ba44be2..194a55ea6f 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/intel.cpp +++ b/src/add-ons/kernel/partitioning_systems/intel/intel.cpp @@ -1,7 +1,11 @@ -//---------------------------------------------------------------------- -// This software is part of the Haiku distribution and is covered -// by the Haiku license. -//--------------------------------------------------------------------- +/* + * Copyright 2003-2006, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Ingo Weinhold, bonefish@cs.tu-berlin.de + */ + /*! \file intel.cpp \brief disk_scanner partition module for "intel" style partitions. @@ -31,8 +35,8 @@ #include "PartitionMap.h" #include "PartitionMapParser.h" -#define TRACE(x) ; -//#define TRACE(x) dprintf x +//#define TRACE(x) ; +#define TRACE(x) dprintf x // module names #define INTEL_PARTITION_MODULE_NAME "partitioning_systems/intel/map/v1" diff --git a/src/system/boot/loader/partitions.cpp b/src/system/boot/loader/partitions.cpp index fa539e753d..368ca50c18 100644 --- a/src/system/boot/loader/partitions.cpp +++ b/src/system/boot/loader/partitions.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Copyright 2003-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Distributed under the terms of the MIT License. */ @@ -19,7 +19,7 @@ using namespace boot; -//#define TRACE_PARTITIONS +#define TRACE_PARTITIONS #ifdef TRACE_PARTITIONS # define TRACE(x) dprintf x #else @@ -409,7 +409,8 @@ get_child_partition(partition_id id, int32 index) //Partition &partition = *(Partition *)id; // ToDo: do we really have to implement this? - // The intel partition module doesn't really needs this for our mission... + // The intel partition module doesn't really need this for our mission... + TRACE(("get_child_partition(id = %lu, index = %ld)\n", id, index)); return NULL; }