xref: /haiku/src/add-ons/kernel/file_systems/udf/VirtualPartition.cpp (revision c5855c9ef4fdd2e4fb30545d3cf45c7291246dc8)
14e77893bSTyler Dauwalder #include "VirtualPartition.h"
24e77893bSTyler Dauwalder 
34e77893bSTyler Dauwalder #define B_NOT_IMPLEMENTED B_ERROR
44e77893bSTyler Dauwalder 
54e77893bSTyler Dauwalder 
64e77893bSTyler Dauwalder /*! \brief Creates a new VirtualPartition object.
74e77893bSTyler Dauwalder 
84e77893bSTyler Dauwalder 	VirtualPartition objects require a valid VAT to be found on disc. This involves
94e77893bSTyler Dauwalder 	looking up the last recorded sector on the disc (via the "READ CD RECORDED
104e77893bSTyler Dauwalder 	CAPACITY" SCSI-MMC call (code 0x25)), which	should contain the file entry for
114e77893bSTyler Dauwalder 	the VAT. Once found, the VAT can be loaded and accessed like a normal file.
124e77893bSTyler Dauwalder */
VirtualPartition(PhysicalPartition & physicalPartition)134e77893bSTyler Dauwalder VirtualPartition::VirtualPartition(PhysicalPartition &physicalPartition)
144e77893bSTyler Dauwalder 	: fPhysicalPartition(physicalPartition)
154e77893bSTyler Dauwalder {
16*c5855c9eSSalvatore Benedetto 	TRACE_ERROR(("VirtualPartition::VirtualPartition: not implemented!\n"));
174e77893bSTyler Dauwalder 	// Find VAT
184e77893bSTyler Dauwalder }
194e77893bSTyler Dauwalder 
20*c5855c9eSSalvatore Benedetto 
21*c5855c9eSSalvatore Benedetto /*! \brief Destroys the VirtualPartition object. */
~VirtualPartition()224e77893bSTyler Dauwalder VirtualPartition::~VirtualPartition()
234e77893bSTyler Dauwalder {
244e77893bSTyler Dauwalder }
254e77893bSTyler Dauwalder 
26*c5855c9eSSalvatore Benedetto 
274e77893bSTyler Dauwalder /*! \brief Maps the given logical block to a physical block on disc.
284e77893bSTyler Dauwalder 
294e77893bSTyler Dauwalder 	The given logical block is indexed into the VAT. If a corresponding
304e77893bSTyler Dauwalder 	mapped block exists, that block is mapped to a physical block via the
314e77893bSTyler Dauwalder 	VirtualPartition object's physical partition.
324e77893bSTyler Dauwalder */
334e77893bSTyler Dauwalder status_t
MapBlock(uint32 logicalBlock,off_t & physicalBlock)34a1b5a724STyler Dauwalder VirtualPartition::MapBlock(uint32 logicalBlock, off_t &physicalBlock)
354e77893bSTyler Dauwalder {
364e77893bSTyler Dauwalder 	return B_NOT_IMPLEMENTED;
374e77893bSTyler Dauwalder }
384e77893bSTyler Dauwalder 
39*c5855c9eSSalvatore Benedetto 
40*c5855c9eSSalvatore Benedetto /*! Returns the initialization status of the object. */
414e77893bSTyler Dauwalder status_t
InitCheck()424e77893bSTyler Dauwalder VirtualPartition::InitCheck()
434e77893bSTyler Dauwalder {
444e77893bSTyler Dauwalder 	return B_NO_INIT;
454e77893bSTyler Dauwalder }
46