David,

You can also open the physical Block I/O Protocol using OpenProtocol() with and 
attribute of EFI_OPEN_PROTOCOL_EXCLUSIVE.  That will force all the partition 
and file system drivers and any other drivers off that handle so you can modify 
the disk layout safely.  You have to check the return status to make sure your 
request for exclusive access was granted.

When you are done, you can call CloseProtocol() to release the exclusive 
access, and call ConnectController() for that handle to get the partition and 
file system drivers to discover the new layout.

Best regards, 

Mike

-----Original Message-----
From: Andrew Fish [mailto:af...@apple.com] 
Sent: Saturday, February 02, 2013 3:25 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Tell UEFI to rescan device/forget about partitions.

If you need to do it from code gBS->DisconnectController() and 
gBS->ConnectController(). So basically you stop the driver from managing the 
handle and start it again. 

Andrew Fish


On Feb 2, 2013, at 2:40 PM, "David F." <df7...@gmail.com> wrote:

> Question, where do you tell the block devices to forget about its knowledge 
> of partitions, because they may be deleted, added, altered?
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to