xref: /haiku/src/add-ons/kernel/file_systems/udf/VirtualPartition.cpp (revision db10640de90f7f9519ba2da9577b7c1af3c64f6b)
1 #include "VirtualPartition.h"
2 
3 #define B_NOT_IMPLEMENTED B_ERROR
4 
5 using namespace Udf;
6 
7 /*! \brief Creates a new VirtualPartition object.
8 
9 	VirtualPartition objects require a valid VAT to be found on disc. This involves
10 	looking up the last recorded sector on the disc (via the "READ CD RECORDED
11 	CAPACITY" SCSI-MMC call (code 0x25)), which	should contain the file entry for
12 	the VAT. Once found, the VAT can be loaded and accessed like a normal file.
13 */
14 VirtualPartition::VirtualPartition(PhysicalPartition &physicalPartition)
15 	: fPhysicalPartition(physicalPartition)
16 {
17 	// Find VAT
18 }
19 
20 /*! \brief Destroys the VirtualPartition object.
21 */
22 VirtualPartition::~VirtualPartition()
23 {
24 }
25 
26 /*! \brief Maps the given logical block to a physical block on disc.
27 
28 	The given logical block is indexed into the VAT. If a corresponding
29 	mapped block exists, that block is mapped to a physical block via the
30 	VirtualPartition object's physical partition.
31 */
32 status_t
33 VirtualPartition::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 VirtualPartition::InitCheck()
42 {
43 	return B_NO_INIT;
44 }
45