summaryrefslogtreecommitdiffstats
path: root/FatPkg/EnhancedFatDxe/Fat.c
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-12-08 16:01:15 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-12-09 11:02:09 +0800
commit205cc663778b5f5ae273065733b8080f64d3f324 (patch)
treed02838b9a198ec1c8282de4974bfc2f059f41d5e /FatPkg/EnhancedFatDxe/Fat.c
parentcae7420b4bd015b78f915c4ba766dbee15da0468 (diff)
downloadedk2-205cc663778b5f5ae273065733b8080f64d3f324.tar.gz
edk2-205cc663778b5f5ae273065733b8080f64d3f324.tar.bz2
edk2-205cc663778b5f5ae273065733b8080f64d3f324.zip
FatPkg/EnhancedFatDxe: Add comments for functions
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'FatPkg/EnhancedFatDxe/Fat.c')
-rw-r--r--FatPkg/EnhancedFatDxe/Fat.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/FatPkg/EnhancedFatDxe/Fat.c b/FatPkg/EnhancedFatDxe/Fat.c
index 2e6c089650..e29c64cb03 100644
--- a/FatPkg/EnhancedFatDxe/Fat.c
+++ b/FatPkg/EnhancedFatDxe/Fat.c
@@ -14,6 +14,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Fat.h"
+/**
+
+ Register Driver Binding protocol for this driver.
+
+ @param ImageHandle - Handle for the image of this driver.
+ @param SystemTable - Pointer to the EFI System Table.
+
+ @retval EFI_SUCCESS - Driver loaded.
+ @return other - Driver not loaded.
+
+**/
EFI_STATUS
EFIAPI
FatEntryPoint (
@@ -21,12 +32,36 @@ FatEntryPoint (
IN EFI_SYSTEM_TABLE *SystemTable
);
+/**
+
+ Unload function for this image. Uninstall DriverBinding protocol.
+
+ @param ImageHandle - Handle for the image of this driver.
+
+ @retval EFI_SUCCESS - Driver unloaded successfully.
+ @return other - Driver can not unloaded.
+
+**/
EFI_STATUS
EFIAPI
FatUnload (
IN EFI_HANDLE ImageHandle
);
+/**
+
+ Test to see if this driver can add a file system to ControllerHandle.
+ ControllerHandle must support both Disk IO and Block IO protocols.
+
+ @param This - Protocol instance pointer.
+ @param ControllerHandle - Handle of device to test.
+ @param RemainingDevicePath - Not used.
+
+ @retval EFI_SUCCESS - This driver supports this device.
+ @retval EFI_ALREADY_STARTED - This driver is already running on this device.
+ @return other - This driver does not support this device.
+
+**/
EFI_STATUS
EFIAPI
FatDriverBindingSupported (
@@ -35,6 +70,22 @@ FatDriverBindingSupported (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
+/**
+
+ Start this driver on ControllerHandle by opening a Block IO and Disk IO
+ protocol, reading Device Path. Add a Simple File System protocol to
+ ControllerHandle if the media contains a valid file system.
+
+ @param This - Protocol instance pointer.
+ @param ControllerHandle - Handle of device to bind driver to.
+ @param RemainingDevicePath - Not used.
+
+ @retval EFI_SUCCESS - This driver is added to DeviceHandle.
+ @retval EFI_ALREADY_STARTED - This driver is already running on DeviceHandle.
+ @retval EFI_OUT_OF_RESOURCES - Can not allocate the memory.
+ @return other - This driver does not support this device.
+
+**/
EFI_STATUS
EFIAPI
FatDriverBindingStart (
@@ -43,6 +94,19 @@ FatDriverBindingStart (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
+/**
+
+ Stop this driver on ControllerHandle.
+
+ @param This - Protocol instance pointer.
+ @param ControllerHandle - Handle of device to stop driver on.
+ @param NumberOfChildren - Not used.
+ @param ChildHandleBuffer - Not used.
+
+ @retval EFI_SUCCESS - This driver is removed DeviceHandle.
+ @return other - This driver was not removed from this device.
+
+**/
EFI_STATUS
EFIAPI
FatDriverBindingStop (