1 /* 2 * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7 #include "hfs_plus.h" 8 9 #include <boot/partitions.h> 10 #include <boot/platform.h> 11 #include <util/kernel_cpp.h> 12 13 #include <string.h> 14 #include <unistd.h> 15 #include <fcntl.h> 16 #include <stdio.h> 17 #include <stdlib.h> 18 19 20 using namespace HFSPlus; 21 22 #if 0 23 status_t 24 HFSPlus::get_root_block(int fDevice, char *buffer, int32 blockSize, off_t partitionSize) 25 { 26 hfs_volume_header header; 27 if (read_pos(fDevice, 1024, &header, sizeof(header)) < B_OK) 28 return B_ERROR; 29 30 31 return B_OK; 32 } 33 #endif 34 35 // #pragma mark - 36 37 38 static status_t 39 hfs_plus_get_file_system(boot::Partition *partition, ::Directory **_root) 40 { 41 /* Volume *volume = new Volume(partition); 42 if (volume == NULL) 43 return B_NO_MEMORY; 44 45 if (volume->InitCheck() < B_OK) { 46 delete volume; 47 return B_ERROR; 48 } 49 50 *_root = volume->Root(); 51 */ return B_OK; 52 } 53 54 55 file_system_module_info gAmigaFFSFileSystemModule = { 56 "file_systems/hfs_plus/v1", 57 kPartitionTypeHFSPlus, 58 hfs_plus_get_file_system 59 }; 60 61