2 * Copyright 2012, Jérôme Duval, korli@users.berlios.de.
3 * Copyright 2008, Salvatore Benedetto, salvatore.benedetto@gmail.com
4 * Copyright 2003, Tyler Dauwalder, tyler@dauwalder.net.
5 * Distributed under the terms of the MIT License.
13 #include <fs_interface.h>
14 #include <KernelExport.h>
16 #include <util/kernel_cpp.h>
20 #include "UdfString.h"
21 #include "UdfStructures.h"
22 #include "Partition.h"
28 Volume(fs_volume
*volume
);
31 status_t
Mount(const char *device
, off_t offset
, off_t length
,
32 uint32 blockSize
, uint32 flags
);
35 bool IsReadOnly() { return true; }
38 status_t
MapBlock(long_address address
, off_t
*mappedBlock
);
39 status_t
MapExtent(long_address logicalExtent
,
40 extent_address
&physicalExtent
);
43 const char *Name() const;
44 int Device() const { return fDevice
; }
45 dev_t
ID() const { return fFSVolume
? fFSVolume
->id
: -1; }
46 fs_volume
*FSVolume() const { return fFSVolume
; }
47 off_t
Offset() const { return fOffset
; }
48 off_t
Length() const { return fLength
; }
49 void *BlockCache() {return fBlockCache
; }
50 uint32
BlockSize() const { return fBlockSize
; }
51 uint32
BlockShift() const { return fBlockShift
; }
52 bool Mounted() const { return fMounted
; }
53 Icb
* RootIcb() { return fRootIcb
; }
54 primary_volume_descriptor
*PrimaryVolumeDescriptor()
55 { return &fPrimaryVolumeDescriptor
; }
60 status_t
_SetPartition(uint number
, Partition
*partition
);
61 Partition
* _GetPartition(uint number
);
73 Partition
*fPartitions
[UDF_MAX_PARTITION_MAPS
];
74 Icb
*fRootIcb
; // Destroyed by vfs via callback to put_node()
75 primary_volume_descriptor fPrimaryVolumeDescriptor
;
78 #endif // _UDF_VOLUME_H