[haiku-commits] r37334 - haiku/trunk/src/add-ons/disk_systems/intel

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 2 Jul 2010 10:14:54 +0200 (CEST)

Author: axeld
Date: 2010-07-02 10:14:54 +0200 (Fri, 02 Jul 2010)
New Revision: 37334
Changeset: http://dev.haiku-os.org/changeset/37334/haiku

Modified:
   haiku/trunk/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp
   haiku/trunk/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp
Log:
* Further cleanup while I was at it.


Modified: haiku/trunk/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp
===================================================================
--- haiku/trunk/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp       
2010-07-02 08:10:38 UTC (rev 37333)
+++ haiku/trunk/src/add-ons/disk_systems/intel/ExtendedPartitionAddOn.cpp       
2010-07-02 08:14:54 UTC (rev 37334)
@@ -3,6 +3,7 @@
  * Distributed under the terms of the MIT License.
  */
 
+
 #include "ExtendedPartitionAddOn.h"
 
 #include <new>
@@ -16,16 +17,18 @@
 
 #include "IntelDiskSystem.h"
 
+
 //#define TRACE_EXTENDED_PARTITION_ADD_ON
 #undef TRACE
 #ifdef TRACE_EXTENDED_PARTITION_ADD_ON
-# define TRACE(x...) printf(x)
+#      define TRACE(x...) printf(x)
 #else
-# define TRACE(x...) do {} while (false)
+#      define TRACE(x...) do {} while (false)
 #endif
 
 #define PTS_OFFSET (63 * Partition()->BlockSize())
 
+
 using std::nothrow;
 
 
@@ -54,20 +57,18 @@
 // #pragma mark - ExtendedPartitionAddOn
 
 
-// constructor
 ExtendedPartitionAddOn::ExtendedPartitionAddOn()
-       : BDiskSystemAddOn(kPartitionTypeIntelExtended, kDiskSystemFlags)
+       :
+       BDiskSystemAddOn(kPartitionTypeIntelExtended, kDiskSystemFlags)
 {
 }
 
 
-// destructor
 ExtendedPartitionAddOn::~ExtendedPartitionAddOn()
 {
 }
 
 
-// CreatePartitionHandle
 status_t
 ExtendedPartitionAddOn::CreatePartitionHandle(BMutablePartition* partition,
        BPartitionHandle** _handle)
@@ -88,7 +89,6 @@
 }
 
 
-// CanInitialize
 bool
 ExtendedPartitionAddOn::CanInitialize(const BMutablePartition* partition)
 {
@@ -97,7 +97,6 @@
 }
 
 
-// GetInitializationParameterEditor
 status_t
 ExtendedPartitionAddOn::GetInitializationParameterEditor(
        const BMutablePartition* partition, BPartitionParameterEditor** editor)
@@ -108,7 +107,6 @@
 }
 
 
-// ValidateInitialize
 status_t
 ExtendedPartitionAddOn::ValidateInitialize(const BMutablePartition* partition,
        BString* name, const char* parameters)
@@ -126,7 +124,6 @@
 }
 
 
-// Initialize
 status_t
 ExtendedPartitionAddOn::Initialize(BMutablePartition* partition,
        const char* name, const char* parameters, BPartitionHandle** _handle)
@@ -164,20 +161,18 @@
 // #pragma mark - ExtendedPartitionHandle
 
 
-// constructor
 ExtendedPartitionHandle::ExtendedPartitionHandle(BMutablePartition* partition)
-       : BPartitionHandle(partition)
+       :
+       BPartitionHandle(partition)
 {
 }
 
 
-// destructor
 ExtendedPartitionHandle::~ExtendedPartitionHandle()
 {
 }
 
 
-// Init
 status_t
 ExtendedPartitionHandle::Init()
 {
@@ -234,14 +229,13 @@
 }
 
 
-// SupportedOperations
 uint32
 ExtendedPartitionHandle::SupportedOperations(uint32 mask)
 {
        uint32 flags = 0;
 
        // creating child
-       if (mask & B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD) {
+       if ((mask & B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD) != 0) {
                BPartitioningInfo info;
                if (GetPartitioningInfo(&info) == B_OK
                        && info.CountPartitionableSpaces() > 1) {
@@ -253,7 +247,6 @@
 }
 
 
-// SupportedChildOperations
 uint32
 ExtendedPartitionHandle::SupportedChildOperations(
        const BMutablePartition* child, uint32 mask)
@@ -262,7 +255,6 @@
 }
 
 
-// GetNextSupportedType
 status_t
 ExtendedPartitionHandle::GetNextSupportedType(const BMutablePartition* child,
        int32* cookie, BString* type)
@@ -290,7 +282,6 @@
 }
 
 
-// GetPartitioningInfo
 status_t
 ExtendedPartitionHandle::GetPartitioningInfo(BPartitioningInfo* info)
 {
@@ -325,7 +316,6 @@
 }
 
 
-// GetChildCreationParameterEditor
 status_t
 ExtendedPartitionHandle::GetChildCreationParameterEditor(const char* type,
        BPartitionParameterEditor** editor)
@@ -335,7 +325,6 @@
 }
 
 
-// ValidateCreateChild
 status_t
 ExtendedPartitionHandle::ValidateCreateChild(off_t* _offset, off_t* _size,
        const char* typeString, BString* name, const char* parameters)
@@ -436,7 +425,6 @@
 }
 
 
-// CreateChild
 status_t
 ExtendedPartitionHandle::CreateChild(off_t offset, off_t size,
        const char* typeString, const char* name, const char* _parameters,
@@ -500,7 +488,6 @@
 }
 
 
-// DeleteChild
 status_t
 ExtendedPartitionHandle::DeleteChild(BMutablePartition* child)
 {
@@ -509,4 +496,3 @@
 
        return error;
 }
-

Modified: haiku/trunk/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp
===================================================================
--- haiku/trunk/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp    
2010-07-02 08:10:38 UTC (rev 37333)
+++ haiku/trunk/src/add-ons/disk_systems/intel/PartitionMapAddOn.cpp    
2010-07-02 08:14:54 UTC (rev 37334)
@@ -3,6 +3,7 @@
  * Distributed under the terms of the MIT License.
  */
 
+
 #include "CreationParameterEditor.h"
 #include "PartitionMapAddOn.h"
 
@@ -21,9 +22,9 @@
 //#define TRACE_PARTITION_MAP_ADD_ON
 #undef TRACE
 #ifdef TRACE_PARTITION_MAP_ADD_ON
-# define TRACE(x...) printf(x)
+#      define TRACE(x...) printf(x)
 #else
-# define TRACE(x...) do {} while (false)
+#      define TRACE(x...) do {} while (false)
 #endif
 
 
@@ -55,20 +56,18 @@
 // #pragma mark - PartitionMapAddOn
 
 
-// constructor
 PartitionMapAddOn::PartitionMapAddOn()
-       : BDiskSystemAddOn(kPartitionTypeIntel, kDiskSystemFlags)
+       :
+       BDiskSystemAddOn(kPartitionTypeIntel, kDiskSystemFlags)
 {
 }
 
 
-// destructor
 PartitionMapAddOn::~PartitionMapAddOn()
 {
 }
 
 
-// CreatePartitionHandle
 status_t
 PartitionMapAddOn::CreatePartitionHandle(BMutablePartition* partition,
        BPartitionHandle** _handle)
@@ -88,7 +87,6 @@
 }
 
 
-// CanInitialize
 bool
 PartitionMapAddOn::CanInitialize(const BMutablePartition* partition)
 {
@@ -97,7 +95,6 @@
 }
 
 
-// GetInitializationParameterEditor
 status_t
 PartitionMapAddOn::GetInitializationParameterEditor(
        const BMutablePartition* partition, BPartitionParameterEditor** editor)
@@ -108,7 +105,6 @@
 }
 
 
-// ValidateInitialize
 status_t
 PartitionMapAddOn::ValidateInitialize(const BMutablePartition* partition,
        BString* name, const char* parameters)
@@ -126,7 +122,6 @@
 }
 
 
-// Initialize
 status_t
 PartitionMapAddOn::Initialize(BMutablePartition* partition, const char* name,
        const char* parameters, BPartitionHandle** _handle)
@@ -163,20 +158,18 @@
 // #pragma mark - PartitionMapHandle
 
 
-// constructor
 PartitionMapHandle::PartitionMapHandle(BMutablePartition* partition)
-       : BPartitionHandle(partition)
+       :
+       BPartitionHandle(partition)
 {
 }
 
 
-// destructor
 PartitionMapHandle::~PartitionMapHandle()
 {
 }
 
 
-// Init
 status_t
 PartitionMapHandle::Init()
 {
@@ -220,7 +213,6 @@
 }
 
 
-// SupportedOperations
 uint32
 PartitionMapHandle::SupportedOperations(uint32 mask)
 {
@@ -232,7 +224,7 @@
                | B_DISK_SYSTEM_SUPPORTS_INITIALIZING;
 
        // creating child
-       if (mask & B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD) {
+       if ((mask & B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD) != 0) {
                BPartitioningInfo info;
                if (partition->CountChildren() < 4
                        && GetPartitioningInfo(&info) == B_OK
@@ -245,7 +237,6 @@
 }
 
 
-// SupportedChildOperations
 uint32
 PartitionMapHandle::SupportedChildOperations(const BMutablePartition* child,
        uint32 mask)
@@ -257,7 +248,6 @@
 }
 
 
-// GetNextSupportedType
 status_t
 PartitionMapHandle::GetNextSupportedType(const BMutablePartition* child,
        int32* cookie, BString* type)
@@ -286,7 +276,6 @@
 }
 
 
-// GetPartitioningInfo
 status_t
 PartitionMapHandle::GetPartitioningInfo(BPartitioningInfo* info)
 {
@@ -312,7 +301,6 @@
 }
 
 
-// GetChildCreationParameterEditor
 status_t
 PartitionMapHandle::GetChildCreationParameterEditor(const char* type,
        BPartitionParameterEditor** editor)
@@ -328,7 +316,6 @@
 }
 
 
-// ValidateCreateChild
 status_t
 PartitionMapHandle::ValidateCreateChild(off_t* _offset, off_t* _size,
        const char* typeString, BString* name, const char* parameters)
@@ -444,7 +431,6 @@
 }
 
 
-// CreateChild
 status_t
 PartitionMapHandle::CreateChild(off_t offset, off_t size,
        const char* typeString, const char* name, const char* parameters,
@@ -533,7 +519,6 @@
 }
 
 
-// DeleteChild
 status_t
 PartitionMapHandle::DeleteChild(BMutablePartition* child)
 {


Other related posts:

  • » [haiku-commits] r37334 - haiku/trunk/src/add-ons/disk_systems/intel - axeld