This usage is wrong.

The PARTITION_PRIVATE_DATA is a hidden private data only referred by Partition 
driver internally. It’s not exposed for external user.

From: Nguyễn Văn Hiễn [mailto:nvhien1...@gmail.com]
Sent: Friday, September 05, 2014 11:48
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] Get PARTITION_PRIVATE_DATA from BlockIo.

Hi all,
I'm trying to get PARTITION_PRIVATE_DATA from *BlockIo using 
PARTITION_DEVICE_FROM_BLOCK_IO_THIS, then I access to attributes of DiskIo in 
PARTITION_PRIVATE_DATA (e.g *->DiskIo->Revision). But a synchronous exception 
error will occur if I access it.

  //Open BlockIo protocol
  Status = gBS->OpenProtocol (
                    BlockIoHandle,
                    &gEfiBlockIoProtocolGuid,
                    (VOID**)&BlockIo, //<=== BlockIo is OK.
                    gImageHandle,
                    NULL,
                    EFI_OPEN_PROTOCOL_GET_PROTOCOL
                    );
  if (EFI_ERROR(Status)) {
     ERROR (L"Error on opening gEfiBlockIoProtocolGuid\n");
     return Status;
  }

  PartitionPrivateData = PARTITION_DEVICE_FROM_BLOCK_IO_THIS (BlockIo);
  if (PartitionPrivateData != NULL) {
     PartitionPrivateData->DiskIo->Revision; //<==== an error occurs in here.
  }

Thanks for any help,
Hien
=================
Ho Chi Minh City University of Technology, VN
nvhien1...@gmail.com<mailto:nvhien1...@gmail.com>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to