xref: /haiku/src/add-ons/kernel/file_systems/udf/MetadataPartition.cpp (revision 24159a0c7d6d6dcba9f2a0c1a7c08d2c8167f21b)
1 #include "MetadataPartition.h"
2 
3 #define B_NOT_IMPLEMENTED B_ERROR
4 
5 using namespace Udf;
6 
7 /*! \brief Creates a new MetadataPartition object.
8 */
9 MetadataPartition::MetadataPartition(Partition &parentPartition,
10                                      uint32 metadataFileLocation,
11 	                                 uint32 metadataMirrorFileLocation,
12 	                                 uint32 metadataBitmapFileLocation,
13 	                                 uint32 allocationUnitSize,
14 	                                 uint16 alignmentUnitSize,
15 	                                 bool metadataIsDuplicated)
16 	: fParentPartition(parentPartition)
17 	, fAllocationUnitSize(allocationUnitSize)
18 	, fAlignmentUnitSize(alignmentUnitSize)
19 	, fMetadataIsDuplicated(metadataIsDuplicated)
20 	, fInitStatus(B_NO_INIT)
21 {
22 }
23 
24 /*! \brief Destroys the MetadataPartition object.
25 */
26 MetadataPartition::~MetadataPartition()
27 {
28 }
29 
30 /*! \brief Maps the given logical block to a physical block on disc.
31 */
32 status_t
33 MetadataPartition::MapBlock(uint32 logicalBlock, off_t &physicalBlock)
34 {
35 	return B_NOT_IMPLEMENTED;
36 }
37 
38 /*! Returns the initialization status of the object.
39 */
40 status_t
41 MetadataPartition::InitCheck()
42 {
43 	return fInitStatus;
44 }
45