Changeset 42741 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Aug 10, 2012 7:11:09 AM (12 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/VBoxHfs.inf
r29125 r42741 36 36 [Packages] 37 37 MdePkg/MdePkg.dec 38 MdeModulePkg/MdeModulePkg.dec 38 39 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 39 40 VBoxPkg/VBoxPkg.dec … … 49 50 DebugLib 50 51 PcdLib 52 DevicePathLib 51 53 52 54 [Guids] … … 61 63 gEfiUnicodeCollationProtocolGuid 62 64 gEfiUnicodeCollation2ProtocolGuid 65 gEfiDevicePathToTextProtocolGuid ## CONSUMED 63 66 64 67 [Pcd] … … 67 70 68 71 [BuildOptions.common] 69 GCC:*_*_*_CC_FLAGS = -DFSTYPE=hfs 72 GCC:*_*_*_CC_FLAGS = -DFSTYPE=hfs -DEFI_LOG_ENABLED=1 70 73 # -DFSW_DEBUG_LEVEL=3 71 74 INTEL:*_*_*_CC_FLAGS = -DFSTYPE=hfs -
trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/VBoxIso9660.inf
r29125 r42741 34 34 [Packages] 35 35 MdePkg/MdePkg.dec 36 MdeModulePkg/MdeModulePkg.dec 36 37 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 37 38 VBoxPkg/VBoxPkg.dec … … 47 48 DebugLib 48 49 PcdLib 50 DevicePathLib 49 51 50 52 [Guids] … … 60 62 gEfiUnicodeCollationProtocolGuid 61 63 gEfiUnicodeCollation2ProtocolGuid 64 gEfiDevicePathToTextProtocolGuid ## CONSUMED 62 65 63 66 [Pcd] -
trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/fsw_core.h
r33540 r42741 72 72 73 73 /** Indicates that the block cache entry is empty. */ 74 #define FSW_INVALID_BNO (~0U L)74 #define FSW_INVALID_BNO (~0U) 75 75 76 76 -
trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/fsw_efi.c
r29125 r42741 67 67 #define FSW_EFI_DRIVER_NAME(t) L"Fsw " FSW_EFI_STRINGIFY(t) L" File System Driver" 68 68 69 69 70 // function prototypes 70 71 … … 222 223 223 224 // first, open DiskIO 225 LogFlowFuncEnter(); 226 LogFlowFuncMarkDP(RemainingDevicePath); 227 224 228 Status = BS->OpenProtocol(ControllerHandle, 225 229 &PROTO_NAME(DiskIoProtocol), … … 227 231 This->DriverBindingHandle, 228 232 ControllerHandle, 229 EFI_OPEN_PROTOCOL_ BY_DRIVER);233 EFI_OPEN_PROTOCOL_GET_PROTOCOL); 230 234 if (EFI_ERROR(Status)) 231 return Status; 235 { 236 LogFlowFuncLeaveRC(Status); 237 return Status; 238 } 232 239 233 240 // we were just checking, close it again … … 244 251 ControllerHandle, 245 252 EFI_OPEN_PROTOCOL_TEST_PROTOCOL); 253 LogFlowFuncLeaveRC(Status); 254 return Status; 255 } 256 257 static EFI_STATUS fsw_efi_ReMount(IN FSW_VOLUME_DATA *pVolume, 258 IN EFI_HANDLE ControllerHandle, 259 EFI_DISK_IO *pDiskIo, 260 EFI_BLOCK_IO *pBlockIo) 261 { 262 EFI_STATUS Status; 263 LogFlowFuncEnter(); 264 pVolume->Signature = FSW_VOLUME_DATA_SIGNATURE; 265 pVolume->Handle = ControllerHandle; 266 pVolume->DiskIo = pDiskIo; 267 pVolume->MediaId = pBlockIo->Media->MediaId; 268 pVolume->LastIOStatus = EFI_SUCCESS; 269 270 // mount the filesystem 271 Status = fsw_efi_map_status(fsw_mount(pVolume, &fsw_efi_host_table, 272 &FSW_FSTYPE_TABLE_NAME(FSTYPE), &pVolume->vol), 273 pVolume); 274 275 LogFlowFuncMarkVar(Status, "%r"); 276 if (!EFI_ERROR(Status)) { 277 // register the SimpleFileSystem protocol 278 pVolume->FileSystem.Revision = EFI_FILE_IO_INTERFACE_REVISION; 279 pVolume->FileSystem.OpenVolume = fsw_efi_FileSystem_OpenVolume; 280 Status = BS->InstallMultipleProtocolInterfaces(&ControllerHandle, 281 &PROTO_NAME(SimpleFileSystemProtocol), &pVolume->FileSystem, 282 NULL); 283 if (EFI_ERROR(Status)) 284 Print(L"Fsw ERROR: InstallMultipleProtocolInterfaces returned %x\n", Status); 285 } 286 LogFlowFuncLeaveRC(Status); 246 287 return Status; 247 288 } … … 269 310 FSW_VOLUME_DATA *Volume; 270 311 271 #if DEBUG_LEVEL 272 Print(L"fsw_efi_DriverBinding_Start\n"); 273 #endif 274 312 LogFlowFuncEnter(); 275 313 // open consumed protocols 276 314 Status = BS->OpenProtocol(ControllerHandle, … … 281 319 EFI_OPEN_PROTOCOL_GET_PROTOCOL); // NOTE: we only want to look at the MediaId 282 320 if (EFI_ERROR(Status)) { 283 Print(L"Fsw ERROR: OpenProtocol(BlockIo) returned %x\n",Status);321 LogFlowFuncLeaveRC(Status); 284 322 return Status; 285 323 } … … 292 330 EFI_OPEN_PROTOCOL_BY_DRIVER); 293 331 if (EFI_ERROR(Status)) { 294 Print(L"Fsw ERROR: OpenProtocol(DiskIo) returned %x\n",Status);332 LogFlowFuncLeaveRC(Status); 295 333 return Status; 296 334 } … … 298 336 // allocate volume structure 299 337 Volume = AllocateZeroPool(sizeof(FSW_VOLUME_DATA)); 300 Volume->Signature = FSW_VOLUME_DATA_SIGNATURE; 301 Volume->Handle = ControllerHandle; 302 Volume->DiskIo = DiskIo; 303 Volume->MediaId = BlockIo->Media->MediaId; 304 Volume->LastIOStatus = EFI_SUCCESS; 305 306 // mount the filesystem 307 Status = fsw_efi_map_status(fsw_mount(Volume, &fsw_efi_host_table, 308 &FSW_FSTYPE_TABLE_NAME(FSTYPE), &Volume->vol), 309 Volume); 310 311 if (!EFI_ERROR(Status)) { 312 // register the SimpleFileSystem protocol 313 Volume->FileSystem.Revision = EFI_FILE_IO_INTERFACE_REVISION; 314 Volume->FileSystem.OpenVolume = fsw_efi_FileSystem_OpenVolume; 315 Status = BS->InstallMultipleProtocolInterfaces(&ControllerHandle, 316 &PROTO_NAME(SimpleFileSystemProtocol), &Volume->FileSystem, 317 NULL); 318 if (EFI_ERROR(Status)) 319 Print(L"Fsw ERROR: InstallMultipleProtocolInterfaces returned %x\n", Status); 320 } 338 Status = fsw_efi_ReMount(Volume, ControllerHandle, DiskIo, BlockIo); 321 339 322 340 // on errors, close the opened protocols … … 326 344 FreePool(Volume); 327 345 328 BS->CloseProtocol(ControllerHandle, 329 &PROTO_NAME(DiskIoProtocol), 330 This->DriverBindingHandle, 331 ControllerHandle); 332 } 333 346 #if 0 347 if (Status == EFI_MEDIA_CHANGED) 348 Status = fsw_efi_ReMount(Volume, ControllerHandle, DiskIo, BlockIo); 349 else 350 #endif 351 BS->CloseProtocol(ControllerHandle, 352 &PROTO_NAME(DiskIoProtocol), 353 This->DriverBindingHandle, 354 ControllerHandle); 355 } 356 357 LogFlowFuncLeaveRC(Status); 334 358 return Status; 335 359 } -
trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/fsw_iso9660.c
r33540 r42741 88 88 static fsw_status_t rr_find_nm(struct fsw_iso9660_volume *vol, struct iso9660_dirrec *dirrec, int off, struct fsw_string *str); 89 89 static fsw_status_t rr_read_ce(struct fsw_iso9660_volume *vol, union fsw_rock_ridge_susp_ce *ce, fsw_u8 *begin); 90 static void dump_dirrec(struct iso9660_dirrec *dirrec);91 90 // 92 91 // Dispatch Table … … 226 225 { 227 226 int rc; 228 int i;229 fsw_u8 *r = begin + ISOINT(ce->X.offset);230 int len = ISOINT(ce->X.len);231 227 rc = vol->g.host_table->read_block(&vol->g, ISOINT(ce->X.block_loc), begin); 232 228 if (rc != FSW_SUCCESS) 233 229 return rc; 234 for (i = 0; i < len; ++i) 235 { 236 DEBUG((DEBUG_INFO, "%d: (%d:%x)%c ", i, r[i], r[i], r[i])); 237 } 238 return FSW_SUCCESS; 239 } 240 static void dump_dirrec(struct iso9660_dirrec *dirrec) 241 { 242 int i; 243 fsw_u8 *r = (fsw_u8 *)dirrec + dirrec->file_identifier_length; 244 int len = dirrec->dirrec_length; 245 for (i = dirrec->file_identifier_length; i < len; ++i) 246 { 247 DEBUG((DEBUG_INFO, "%d: (%d:%x)%c ", i, r[i], r[i], r[i])); 248 } 230 return FSW_SUCCESS; 249 231 } 250 232 /** … … 624 606 return FSW_VOLUME_CORRUPTED; 625 607 626 dump_dirrec(dirrec);627 608 if (vol->fRockRidge) 628 609 {
Note:
See TracChangeset
for help on using the changeset viewer.