DiskStructures.{h,cpp} -> UdfStructures.{h,cpp}
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5528 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "DiskStructures.h"
|
||||
#include "UdfStructures.h"
|
||||
#include "Icb.h"
|
||||
#include "Volume.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
#include "kernel_cpp.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "DiskStructures.h"
|
||||
#include "UdfStructures.h"
|
||||
#include "Volume.h"
|
||||
|
||||
namespace Udf {
|
||||
|
||||
@@ -22,7 +22,7 @@ extern "C" {
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "CachedBlock.h"
|
||||
#include "DiskStructures.h"
|
||||
#include "UdfStructures.h"
|
||||
#include "SinglyLinkedList.h"
|
||||
|
||||
namespace Udf {
|
||||
|
||||
@@ -32,13 +32,13 @@ R5KernelAddon udf : [ FDirName kernel file_systems udf ] :
|
||||
|
||||
CS0String.cpp
|
||||
DirectoryIterator.cpp
|
||||
DiskStructures.cpp
|
||||
Icb.cpp
|
||||
MetadataPartition.cpp
|
||||
PhysicalPartition.cpp
|
||||
Recognition.cpp
|
||||
SparablePartition.cpp
|
||||
UdfDebug.cpp
|
||||
UdfStructures.cpp
|
||||
Utils.cpp
|
||||
VirtualPartition.cpp
|
||||
Volume.cpp
|
||||
|
||||
@@ -41,33 +41,26 @@ Udf::udf_recognize(int device, off_t offset, off_t length, uint32 blockSize,
|
||||
length, blockSize));
|
||||
|
||||
// Check the block size
|
||||
uint32 bitCount = 0;
|
||||
for (int i = 0; i < 32; i++) {
|
||||
// Zero out all bits except bit i
|
||||
uint32 block = blockSize & (uint32(1) << i);
|
||||
if (block) {
|
||||
if (++bitCount > 1) {
|
||||
PRINT(("Block size must be a power of two! (blockSize = %ld)\n", blockSize));
|
||||
RETURN(B_BAD_VALUE);
|
||||
} else {
|
||||
blockShift = i;
|
||||
PRINT(("blockShift: %ld\n", blockShift));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check for a valid volume recognition sequence
|
||||
status_t error = walk_volume_recognition_sequence(device, offset, blockSize, blockShift);
|
||||
|
||||
// Now hunt down a volume descriptor sequence from one of
|
||||
// the anchor volume pointers (if there are any).
|
||||
status_t error = get_block_shift(blockSize, blockShift);
|
||||
if (!error) {
|
||||
error = walk_anchor_volume_descriptor_sequences(device, offset, length,
|
||||
blockSize, blockShift,
|
||||
logicalVolumeDescriptor,
|
||||
partitionDescriptors,
|
||||
partitionDescriptorCount);
|
||||
PRINT(("blockShift: %ld\n", blockShift));
|
||||
|
||||
// Check for a valid volume recognition sequence
|
||||
error = walk_volume_recognition_sequence(device, offset, blockSize, blockShift);
|
||||
|
||||
// Now hunt down a volume descriptor sequence from one of
|
||||
// the anchor volume pointers (if there are any).
|
||||
if (!error) {
|
||||
error = walk_anchor_volume_descriptor_sequences(device, offset, length,
|
||||
blockSize, blockShift,
|
||||
logicalVolumeDescriptor,
|
||||
partitionDescriptors,
|
||||
partitionDescriptorCount);
|
||||
}
|
||||
} else {
|
||||
PRINT(("Block size must be a positive power of two! (blockSize = %ld)\n", blockSize));
|
||||
}
|
||||
|
||||
RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/*! \file Recognition.h
|
||||
*/
|
||||
|
||||
#include "DiskStructures.h"
|
||||
#include "UdfStructures.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
namespace Udf {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <kernel_cpp.h>
|
||||
|
||||
#include "DiskStructures.h"
|
||||
#include "UdfStructures.h"
|
||||
#include "Partition.h"
|
||||
#include "UdfDebug.h"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
#include "UdfDebug.h"
|
||||
|
||||
#include "CS0String.h"
|
||||
#include "DiskStructures.h"
|
||||
#include "UdfStructures.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace Udf {
|
||||
|
||||
@@ -36,16 +36,16 @@ SubDirHdrs [ FDirName $(OBOS_TOP) src add-ons kernel file_systems udf ] ;
|
||||
Addon i-udf-ds : [ FDirName drive_setup fs ] :
|
||||
udf-ds.cpp
|
||||
CS0String.cpp
|
||||
DiskStructures.cpp
|
||||
Recognition.cpp
|
||||
UdfDebug.cpp
|
||||
UdfStructures.cpp
|
||||
|
||||
: false
|
||||
:
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles
|
||||
CS0String.cpp DiskStructures.cpp Recognition.cpp UdfDebug.cpp
|
||||
CS0String.cpp Recognition.cpp UdfDebug.cpp UdfStructures.cpp
|
||||
] = [ FDirName $(OBOS_TOP) src add-ons kernel file_systems udf ] ;
|
||||
|
||||
rule InstallUDFDS
|
||||
|
||||
@@ -17,18 +17,20 @@ SimpleTest udf_shell
|
||||
sysdep.c hexdump.c argv.c tracker.cpp
|
||||
|
||||
udf.cpp
|
||||
CS0String.cpp DirectoryIterator.cpp DiskStructures.cpp Icb.cpp
|
||||
CS0String.cpp DirectoryIterator.cpp Icb.cpp
|
||||
MetadataPartition.cpp PhysicalPartition.cpp Recognition.cpp
|
||||
UdfDebug.cpp Utils.cpp SparablePartition.cpp VirtualPartition.cpp Volume.cpp
|
||||
UdfDebug.cpp UdfStructures.cpp Utils.cpp SparablePartition.cpp
|
||||
VirtualPartition.cpp Volume.cpp
|
||||
:
|
||||
;
|
||||
|
||||
# Tell Jam where to find these sources
|
||||
SEARCH on [ FGristFiles
|
||||
udf.cpp
|
||||
CS0String.cpp DirectoryIterator.cpp DiskStructures.cpp Icb.cpp
|
||||
CS0String.cpp DirectoryIterator.cpp Icb.cpp
|
||||
MetadataPartition.cpp PhysicalPartition.cpp Recognition.cpp
|
||||
UdfDebug.cpp Utils.cpp SparablePartition.cpp VirtualPartition.cpp Volume.cpp
|
||||
UdfDebug.cpp UdfStructures.cpp Utils.cpp SparablePartition.cpp
|
||||
VirtualPartition.cpp Volume.cpp
|
||||
] = [ FDirName $(OBOS_TOP) src add-ons kernel file_systems udf ] ;
|
||||
|
||||
SEARCH on [ FGristFiles
|
||||
|
||||
Reference in New Issue
Block a user