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