5d22fa967a
* Fixed handling of the deletion (removal) of shadow partitions. Formerly the shadow partition corresponding to the disk device wasn't removed properly. * Added a shadow_id field to the user_partition_data structure which contains the ID of the shadow partition, if it is one. The id field will hold the ID of the physical partition. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3974 a95241bf-73f2-0310-859d-f6bbb57e9c96
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
// KPartition.h
|
|
|
|
#ifndef _K_DISK_DEVICE_SHADOW_PARTITION_H
|
|
#define _K_DISK_DEVICE_SHADOW_PARTITION_H
|
|
|
|
#include "KPartition.h"
|
|
|
|
namespace BPrivate {
|
|
namespace DiskDevice {
|
|
|
|
class KPhysicalPartition;
|
|
|
|
class KShadowPartition : public KPartition {
|
|
public:
|
|
KShadowPartition(KPhysicalPartition *physicalPartition);
|
|
virtual ~KShadowPartition();
|
|
|
|
// Hierarchy
|
|
|
|
virtual status_t CreateChild(partition_id id, int32 index,
|
|
KPartition **child = NULL);
|
|
|
|
// Shadow Partition
|
|
|
|
virtual KShadowPartition *ShadowPartition() const;
|
|
virtual bool IsShadowPartition() const;
|
|
void UnsetPhysicalPartition();
|
|
virtual KPhysicalPartition *PhysicalPartition() const;
|
|
|
|
void SyncWithPhysicalPartition();
|
|
|
|
virtual void WriteUserData(UserDataWriter &writer,
|
|
user_partition_data *data);
|
|
|
|
virtual void Dump(bool deep, int32 level);
|
|
|
|
protected:
|
|
KPhysicalPartition *fPhysicalPartition;
|
|
};
|
|
|
|
} // namespace DiskDevice
|
|
} // namespace BPrivate
|
|
|
|
using BPrivate::DiskDevice::KShadowPartition;
|
|
|
|
#endif // _K_DISK_DEVICE_SHADOW_PARTITION_H
|