PartitionDriverBindingStart,\r
PartitionDriverBindingStop,\r
//\r
- // Grub4Dos copies the BPB of the first partition to the MBR. If the \r
- // DriverBindingStart() of the Fat driver gets run before that of Partition \r
+ // Grub4Dos copies the BPB of the first partition to the MBR. If the\r
+ // DriverBindingStart() of the Fat driver gets run before that of Partition\r
// driver only the first partition can be recognized.\r
// Let the driver binding version of Partition driver be higher than that of\r
// Fat driver to make sure the DriverBindingStart() of the Partition driver\r
};\r
\r
//\r
-// Prioritized function list to detect partition table. \r
+// Prioritized function list to detect partition table.\r
//\r
PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = {\r
PartitionInstallGptChildHandles,\r
//\r
if (RemainingDevicePath != NULL) {\r
//\r
- // Check if RemainingDevicePath is the End of Device Path Node, \r
+ // Check if RemainingDevicePath is the End of Device Path Node,\r
// if yes, go on checking other conditions\r
//\r
if (!IsDevicePathEnd (RemainingDevicePath)) {\r
EFI_TPL OldTpl;\r
\r
BlockIo2 = NULL;\r
- OldTpl = gBS->RaiseTPL (TPL_CALLBACK); \r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
//\r
// Check RemainingDevicePath validation\r
//\r
if (RemainingDevicePath != NULL) {\r
//\r
- // Check if RemainingDevicePath is the End of Device Path Node, \r
+ // Check if RemainingDevicePath is the End of Device Path Node,\r
// if yes, return EFI_SUCCESS\r
//\r
if (IsDevicePathEnd (RemainingDevicePath)) {\r
// driver. So don't try to close them. Otherwise, we will break the dependency\r
// between the controller and the driver set up before.\r
//\r
- // In the case that when the media changes on a device it will Reinstall the \r
+ // In the case that when the media changes on a device it will Reinstall the\r
// BlockIo interaface. This will cause a call to our Stop(), and a subsequent\r
// reentrant call to our Start() successfully. We should leave the device open\r
// when this happen. The "media change" case includes either the status is\r
- // EFI_MEDIA_CHANGED or it is a "media" to "no media" change. \r
- // \r
+ // EFI_MEDIA_CHANGED or it is a "media" to "no media" change.\r
+ //\r
if (EFI_ERROR (Status) &&\r
!EFI_ERROR (OpenStatus) &&\r
Status != EFI_MEDIA_CHANGED &&\r
);\r
//\r
// Close Parent DiskIo2 if has.\r
- // \r
+ //\r
gBS->CloseProtocol (\r
ControllerHandle,\r
&gEfiDiskIo2ProtocolGuid,\r
);\r
//\r
// Close Parent BlockIO2 if has.\r
- // \r
+ //\r
gBS->CloseProtocol (\r
ControllerHandle,\r
&gEfiDiskIo2ProtocolGuid,\r
This->DriverBindingHandle,\r
ControllerHandle,\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
- ); \r
+ );\r
\r
\r
Private = PARTITION_DEVICE_FROM_BLOCK_IO_THIS (BlockIo);\r
\r
/**\r
Read BufferSize bytes from Lba into Buffer.\r
- \r
+\r
This function reads the requested number of blocks from the device. All the\r
blocks are read, or an error is returned.\r
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and\r
not be signaled.\r
\r
@param[in] This Indicates a pointer to the calling context.\r
- @param[in] MediaId Id of the media, changes every time the media is \r
+ @param[in] MediaId Id of the media, changes every time the media is\r
replaced.\r
@param[in] Lba The starting Logical Block Address to read from.\r
- @param[in, out] Token A pointer to the token associated with the transaction.\r
- @param[in] BufferSize Size of Buffer, must be a multiple of device block size. \r
- @param[out] Buffer A pointer to the destination buffer for the data. The \r
- caller is responsible for either having implicit or \r
+ @param[in, out] Token A pointer to the token associated with the transaction.\r
+ @param[in] BufferSize Size of Buffer, must be a multiple of device block size.\r
+ @param[out] Buffer A pointer to the destination buffer for the data. The\r
+ caller is responsible for either having implicit or\r
explicit ownership of the buffer.\r
\r
@retval EFI_SUCCESS The read request was queued if Token->Event is\r
@retval EFI_MEDIA_CHANGED The MediaId is not for the current media.\r
@retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the\r
intrinsic block size of the device.\r
- @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, \r
+ @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack\r
of resources.\r
@retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
- @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, \r
+ @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack\r
of resources.\r
if (Offset + BufferSize > Private->End) {\r
return ProbeMediaStatusEx (Private->DiskIo2, MediaId, EFI_INVALID_PARAMETER);\r
}\r
- \r
+\r
if ((Token != NULL) && (Token->Event != NULL)) {\r
Task = PartitionCreateAccessTask (Token);\r
if (Task == NULL) {\r
\r
/**\r
Flush the Block Device.\r
- \r
+\r
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED\r
is returned and non-blocking I/O is being used, the Event associated with\r
- this request will not be signaled. \r
+ this request will not be signaled.\r
\r
@param[in] This Indicates a pointer to the calling context.\r
@param[in, out] Token A pointer to the token associated with the transaction\r
// Set the BlockIO into Private Data.\r
//\r
Private->BlockIo.Revision = ParentBlockIo->Revision;\r
- \r
+\r
Private->BlockIo.Media = &Private->Media;\r
CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA));\r
\r
Private->BlockIo2.Reset = PartitionResetEx;\r
Private->BlockIo2.ReadBlocksEx = PartitionReadBlocksEx;\r
Private->BlockIo2.WriteBlocksEx = PartitionWriteBlocksEx;\r
- Private->BlockIo2.FlushBlocksEx = PartitionFlushBlocksEx; \r
+ Private->BlockIo2.FlushBlocksEx = PartitionFlushBlocksEx;\r
}\r
\r
Private->Media.IoAlign = 0;\r
}\r
\r
//\r
- // Create the new handle. \r
+ // Create the new handle.\r
//\r
Private->Handle = NULL;\r
if (Private->DiskIo2 != NULL) {\r
NULL,\r
NULL\r
);\r
- } else { \r
+ } else {\r
Status = gBS->InstallMultipleProtocolInterfaces (\r
&Private->Handle,\r
&gEfiDevicePathProtocolGuid,\r
/**\r
The user Entry Point for module Partition. The user code starts with this function.\r
\r
- @param[in] ImageHandle The firmware allocated handle for the EFI image. \r
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
@param[in] SystemTable A pointer to the EFI System Table.\r
- \r
+\r
@retval EFI_SUCCESS The entry point is executed successfully.\r
@retval other Some error occurs when executing this entry point.\r
\r