**/\r
\r
#include "DxeMain.h"\r
+#include "FwVolDriver.h"\r
\r
-#define KEYSIZE sizeof (UINTN)\r
\r
//\r
// Protocol notify related globals\r
FvReadFile,\r
FvReadFileSection,\r
FvWriteFile,\r
- FvGetNextFile,\r
- KEYSIZE,\r
+ FvGetNextFile, \r
+ sizeof (UINTN),\r
NULL,\r
FvGetVolumeInfo,\r
FvSetVolumeInfo\r
//\r
FvhLength = sizeof (EFI_FIRMWARE_VOLUME_HEADER);\r
Status = Fvb->Read (Fvb, 0, 0, &FvhLength, (UINT8 *)&TempFvh);\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
\r
//\r
// Allocate a buffer for the caller\r
\r
\r
/**\r
- This routine is the driver initialization entry point. It initializes the\r
- libraries, and registers two notification functions. These notification\r
- functions are responsible for building the FV stack dynamically.\r
+ This routine is the driver initialization entry point. It registers\r
+ a notification function. This notification function are responsible\r
+ for building the FV stack dynamically.\r
\r
@param ImageHandle The image handle.\r
@param SystemTable The system table.\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
{\r
- gEfiFwVolBlockEvent = CoreCreateProtocolNotifyEvent (\r
+ gEfiFwVolBlockEvent = EfiCreateProtocolNotifyEvent (\r
&gEfiFirmwareVolumeBlockProtocolGuid,\r
TPL_CALLBACK,\r
NotifyFwVolBlock,\r
NULL,\r
- &gEfiFwVolBlockNotifyReg,\r
- TRUE\r
+ &gEfiFwVolBlockNotifyReg\r
);\r
return EFI_SUCCESS;\r
}\r