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:
Tyler Dauwalder
2003-12-02 10:49:37 +00:00
parent c21aaa8af4
commit 9c6a058880
10 changed files with 33 additions and 38 deletions
@@ -13,7 +13,7 @@
#include "kernel_cpp.h" #include "kernel_cpp.h"
#include "UdfDebug.h" #include "UdfDebug.h"
#include "DiskStructures.h" #include "UdfStructures.h"
#include "Icb.h" #include "Icb.h"
#include "Volume.h" #include "Volume.h"
@@ -28,7 +28,7 @@ extern "C" {
#include "kernel_cpp.h" #include "kernel_cpp.h"
#include "UdfDebug.h" #include "UdfDebug.h"
#include "DiskStructures.h" #include "UdfStructures.h"
#include "Volume.h" #include "Volume.h"
namespace Udf { namespace Udf {
+1 -1
View File
@@ -22,7 +22,7 @@ extern "C" {
#include "UdfDebug.h" #include "UdfDebug.h"
#include "CachedBlock.h" #include "CachedBlock.h"
#include "DiskStructures.h" #include "UdfStructures.h"
#include "SinglyLinkedList.h" #include "SinglyLinkedList.h"
namespace Udf { namespace Udf {
+1 -1
View File
@@ -32,13 +32,13 @@ R5KernelAddon udf : [ FDirName kernel file_systems udf ] :
CS0String.cpp CS0String.cpp
DirectoryIterator.cpp DirectoryIterator.cpp
DiskStructures.cpp
Icb.cpp Icb.cpp
MetadataPartition.cpp MetadataPartition.cpp
PhysicalPartition.cpp PhysicalPartition.cpp
Recognition.cpp Recognition.cpp
SparablePartition.cpp SparablePartition.cpp
UdfDebug.cpp UdfDebug.cpp
UdfStructures.cpp
Utils.cpp Utils.cpp
VirtualPartition.cpp VirtualPartition.cpp
Volume.cpp Volume.cpp
@@ -41,33 +41,26 @@ Udf::udf_recognize(int device, off_t offset, off_t length, uint32 blockSize,
length, blockSize)); length, blockSize));
// Check the block size // Check the block size
uint32 bitCount = 0; status_t error = get_block_shift(blockSize, blockShift);
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).
if (!error) { if (!error) {
error = walk_anchor_volume_descriptor_sequences(device, offset, length, PRINT(("blockShift: %ld\n", blockShift));
blockSize, blockShift,
logicalVolumeDescriptor, // Check for a valid volume recognition sequence
partitionDescriptors, error = walk_volume_recognition_sequence(device, offset, blockSize, blockShift);
partitionDescriptorCount);
// 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); RETURN(error);
} }
@@ -10,7 +10,7 @@
/*! \file Recognition.h /*! \file Recognition.h
*/ */
#include "DiskStructures.h" #include "UdfStructures.h"
#include "UdfDebug.h" #include "UdfDebug.h"
namespace Udf { namespace Udf {
@@ -12,7 +12,7 @@
#include <kernel_cpp.h> #include <kernel_cpp.h>
#include "DiskStructures.h" #include "UdfStructures.h"
#include "Partition.h" #include "Partition.h"
#include "UdfDebug.h" #include "UdfDebug.h"
+1 -1
View File
@@ -25,7 +25,7 @@ extern "C" {
#include "UdfDebug.h" #include "UdfDebug.h"
#include "CS0String.h" #include "CS0String.h"
#include "DiskStructures.h" #include "UdfStructures.h"
#include "Partition.h" #include "Partition.h"
namespace Udf { 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 ] : Addon i-udf-ds : [ FDirName drive_setup fs ] :
udf-ds.cpp udf-ds.cpp
CS0String.cpp CS0String.cpp
DiskStructures.cpp
Recognition.cpp Recognition.cpp
UdfDebug.cpp UdfDebug.cpp
UdfStructures.cpp
: false : false
: :
; ;
SEARCH on [ FGristFiles 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 ] ; ] = [ FDirName $(OBOS_TOP) src add-ons kernel file_systems udf ] ;
rule InstallUDFDS rule InstallUDFDS
@@ -17,18 +17,20 @@ SimpleTest udf_shell
sysdep.c hexdump.c argv.c tracker.cpp sysdep.c hexdump.c argv.c tracker.cpp
udf.cpp udf.cpp
CS0String.cpp DirectoryIterator.cpp DiskStructures.cpp Icb.cpp CS0String.cpp DirectoryIterator.cpp Icb.cpp
MetadataPartition.cpp PhysicalPartition.cpp Recognition.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 # Tell Jam where to find these sources
SEARCH on [ FGristFiles SEARCH on [ FGristFiles
udf.cpp udf.cpp
CS0String.cpp DirectoryIterator.cpp DiskStructures.cpp Icb.cpp CS0String.cpp DirectoryIterator.cpp Icb.cpp
MetadataPartition.cpp PhysicalPartition.cpp Recognition.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 ] ; ] = [ FDirName $(OBOS_TOP) src add-ons kernel file_systems udf ] ;
SEARCH on [ FGristFiles SEARCH on [ FGristFiles