Initial checkin. Mostly empty implementation of UDF 2.50 metadata partitions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5230 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c75570328b
commit
9be2e8bd9e
44
src/add-ons/kernel/file_systems/udf/MetadataPartition.cpp
Normal file
44
src/add-ons/kernel/file_systems/udf/MetadataPartition.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "MetadataPartition.h"
|
||||
|
||||
#define B_NOT_IMPLEMENTED B_ERROR
|
||||
|
||||
using namespace Udf;
|
||||
|
||||
/*! \brief Creates a new MetadataPartition object.
|
||||
*/
|
||||
MetadataPartition::MetadataPartition(Partition &parentPartition,
|
||||
uint32 metadataFileLocation,
|
||||
uint32 metadataMirrorFileLocation,
|
||||
uint32 metadataBitmapFileLocation,
|
||||
uint32 allocationUnitSize,
|
||||
uint16 alignmentUnitSize,
|
||||
bool metadataIsDuplicated)
|
||||
: fParentPartition(parentPartition)
|
||||
, fAllocationUnitSize(allocationUnitSize)
|
||||
, fAlignmentUnitSize(alignmentUnitSize)
|
||||
, fMetadataIsDuplicated(metadataIsDuplicated)
|
||||
, fInitStatus(B_NO_INIT)
|
||||
{
|
||||
}
|
||||
|
||||
/*! \brief Destroys the MetadataPartition object.
|
||||
*/
|
||||
MetadataPartition::~MetadataPartition()
|
||||
{
|
||||
}
|
||||
|
||||
/*! \brief Maps the given logical block to a physical block on disc.
|
||||
*/
|
||||
status_t
|
||||
MetadataPartition::MapBlock(uint32 logicalBlock, uint32 &physicalBlock)
|
||||
{
|
||||
return B_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/*! Returns the initialization status of the object.
|
||||
*/
|
||||
status_t
|
||||
MetadataPartition::InitCheck()
|
||||
{
|
||||
return fInitStatus;
|
||||
}
|
51
src/add-ons/kernel/file_systems/udf/MetadataPartition.h
Normal file
51
src/add-ons/kernel/file_systems/udf/MetadataPartition.h
Normal file
@ -0,0 +1,51 @@
|
||||
//----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
// Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
|
||||
//---------------------------------------------------------------------
|
||||
#ifndef _UDF_METADATA_PARTITION_H
|
||||
#define _UDF_METADATA_PARTITION_H
|
||||
|
||||
/*! \file MetadataPartition.h
|
||||
*/
|
||||
|
||||
#include <kernel_cpp.h>
|
||||
|
||||
#include "Partition.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
namespace Udf {
|
||||
|
||||
/*! \brief Type 2 metadata partition
|
||||
|
||||
Metadata partitions allow for clustering of metadata (ICBs, directory
|
||||
contents, etc.) and also provide the option of metadata duplication.
|
||||
|
||||
See also UDF-2.50 2.2.10, UDF-2.50 2.2.13
|
||||
*/
|
||||
class MetadataPartition : public Partition {
|
||||
public:
|
||||
MetadataPartition(Partition &parentPartition, uint32 metadataFileLocation,
|
||||
uint32 metadataMirrorFileLocation, uint32 metadataBitmapFileLocation,
|
||||
uint32 allocationUnitSize, uint16 alignmentUnitSize,
|
||||
bool metadataIsDuplicated);
|
||||
virtual ~MetadataPartition();
|
||||
virtual status_t MapBlock(uint32 logicalBlock, uint32 &physicalBlock);
|
||||
|
||||
status_t InitCheck();
|
||||
|
||||
uint32 AllocationUnitSize() const { return fAllocationUnitSize; }
|
||||
uint16 AlignmentUnitSize() const { return fAlignmentUnitSize; }
|
||||
uint32 MetadataIsDuplicated() const { return fMetadataIsDuplicated; }
|
||||
private:
|
||||
Partition &fParentPartition;
|
||||
uint32 fAllocationUnitSize;
|
||||
uint16 fAlignmentUnitSize;
|
||||
bool fMetadataIsDuplicated;
|
||||
status_t fInitStatus;
|
||||
};
|
||||
|
||||
}; // namespace Udf
|
||||
|
||||
#endif // _UDF_METADATA_PARTITION_H
|
Loading…
x
Reference in New Issue
Block a user