diff --git a/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp b/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp index bff002c785..a8e73f8c97 100644 --- a/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp +++ b/src/add-ons/kernel/partitioning_systems/amiga/amiga_rdb.cpp @@ -1,6 +1,6 @@ /* -** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Distributed under the terms of the OpenBeOS License. +** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the Haiku License. */ @@ -20,18 +20,16 @@ #include -#define TRACE_AMIGA_RDB 0 -#if TRACE_AMIGA_RDB +//#define TRACE_AMIGA_RDB +#ifdef TRACE_AMIGA_RDB # define TRACE(x) dprintf x #else # define TRACE(x) ; #endif -#ifdef _BOOT_MODE -static const char *kPartitionModuleName = "partitioning_systems/amiga_rdb/v1"; -#else -static const char *kPartitionModuleName = NULL; -#endif + +#define AMIGA_PARTITION_MODULE_NAME "partitioning_systems/amiga_rdb/v1" +#define AMIGA_PARTITION_NAME "Amiga Partition Map" template bool @@ -46,7 +44,7 @@ validate_check_sum(Type *type) for (uint32 i = 0; i < type->SummedLongs(); i++) sum += B_BENDIAN_TO_HOST_INT32(longs[i]); -#if TRACE_AMIGA_RDB +#ifdef TRACE_AMIGA_RDB if (sum != 0) TRACE(("search_rdb: check sum is incorrect!\n")); #endif @@ -55,7 +53,7 @@ validate_check_sum(Type *type) } -#if TRACE_AMIGA_RDB +#ifdef TRACE_AMIGA_RDB static char * get_tupel(uint32 id) { @@ -211,16 +209,16 @@ amiga_rdb_free_identify_partition_cookie(partition_data *partition, void *_cooki #ifndef _BOOT_MODE -static partition_module_info gAmigaPartitionModule = { +static partition_module_info sAmigaPartitionModule = { #else partition_module_info gAmigaPartitionModule = { #endif { - kPartitionModuleName, + AMIGA_PARTITION_MODULE_NAME, 0, amiga_rdb_std_ops }, - kPartitionTypeAmiga, // pretty_name + AMIGA_PARTITION_NAME, // pretty_name 0, // flags // scanning @@ -234,7 +232,7 @@ partition_module_info gAmigaPartitionModule = { #ifndef _BOOT_MODE partition_module_info *modules[] = { - &gAmigaPartitionModule, + &sAmigaPartitionModule, NULL }; #endif diff --git a/src/add-ons/kernel/partitioning_systems/apple/apple.cpp b/src/add-ons/kernel/partitioning_systems/apple/apple.cpp index 253eaf3a45..4c2203e22d 100644 --- a/src/add-ons/kernel/partitioning_systems/apple/apple.cpp +++ b/src/add-ons/kernel/partitioning_systems/apple/apple.cpp @@ -1,6 +1,6 @@ /* -** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Distributed under the terms of the OpenBeOS License. +** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the Haiku License. */ @@ -26,7 +26,8 @@ # define TRACE(x) ; #endif -static const char *kPartitionModuleName = "partitioning_systems/apple/v1"; +#define APPLE_PARTITION_MODULE_NAME "partitioning_systems/apple/v1" +#define APPLE_PARTITION_NAME "Apple Partition Map" static const char *kApplePartitionTypes[] = { "partition_map", // the partition map itself @@ -198,11 +199,11 @@ static partition_module_info sApplePartitionModule = { partition_module_info gApplePartitionModule = { #endif { - kPartitionModuleName, + APPLE_PARTITION_MODULE_NAME, 0, apple_std_ops }, - kPartitionTypeApple, // pretty_name + APPLE_PARTITION_NAME, // pretty_name 0, // flags // scanning diff --git a/src/add-ons/kernel/partitioning_systems/intel/Jamfile b/src/add-ons/kernel/partitioning_systems/intel/Jamfile index 9a3653fea5..0a9463f86a 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/Jamfile +++ b/src/add-ons/kernel/partitioning_systems/intel/Jamfile @@ -1,6 +1,5 @@ SubDir OBOS_TOP src add-ons kernel partitioning_systems intel ; -#UsePrivateHeaders $(DOT) ; UsePrivateHeaders [ FDirName kernel disk_device_manager ] ; UsePrivateHeaders [ FDirName kernel ] ; UsePrivateHeaders [ FDirName storage ] ; @@ -10,7 +9,8 @@ KernelAddon intel : kernel partitioning_systems : PartitionMap.cpp ; -# For now build a userland version only. +# Also build a userland version +# ToDo: it's probably not a good idea to build them into the same directory Addon intel : userland partitioning_systems : intel.cpp PartitionMap.cpp diff --git a/src/add-ons/kernel/partitioning_systems/intel/intel.cpp b/src/add-ons/kernel/partitioning_systems/intel/intel.cpp index 51236f803d..8a732e1e0f 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/intel.cpp +++ b/src/add-ons/kernel/partitioning_systems/intel/intel.cpp @@ -1,6 +1,6 @@ //---------------------------------------------------------------------- -// This software is part of the OpenBeOS distribution and is covered -// by the OpenBeOS license. +// This software is part of the Haiku distribution and is covered +// by the Haiku license. //--------------------------------------------------------------------- /*! \file intel.cpp @@ -33,10 +33,12 @@ //#define TRACE(x) dprintf x // module names -static const char *kPartitionMapModuleName - = "partitioning_systems/intel/map/v1"; -static const char *kExtendedPartitionModuleName - = "partitioning_systems/intel/extended/v1"; +#define INTEL_PARTITION_MODULE_NAME "partitioning_systems/intel/map/v1" +#define INTEL_EXTENDED_PARTITION_MODULE_NAME "partitioning_systems/intel/extended/v1" + +// these match those in DiskDeviceTypes.cpp +#define INTEL_PARTITION_NAME "Intel Partition Map" +#define INTEL_EXTENDED_PARTITION_NAME "Intel Extended Partition" // Maximal number of logical partitions per extended partition we allow. static const int32 kMaxLogicalPartitionCount = 128; @@ -314,11 +316,11 @@ partition_module_info gIntelPartitionMapModule = { static partition_module_info intel_partition_map_module = { #endif { - kPartitionMapModuleName, + INTEL_PARTITION_MODULE_NAME, 0, pm_std_ops }, - kPartitionTypeIntel, // pretty_name + INTEL_PARTITION_NAME, // pretty_name 0, // flags // scanning @@ -405,11 +407,11 @@ partition_module_info gIntelExtendedPartitionModule = { static partition_module_info intel_extended_partition_module = { #endif { - kExtendedPartitionModuleName, + INTEL_EXTENDED_PARTITION_MODULE_NAME, 0, ep_std_ops }, - kPartitionTypeIntelExtended, // pretty_name + INTEL_EXTENDED_PARTITION_NAME, // pretty_name 0, // flags // scanning