+ //\r
+ // Allocate buffer for FileName as the passed in FileName may be read only\r
+ //\r
+ Status = gBS->AllocatePool (\r
+ EfiBootServicesData,\r
+ StrSize (FileName),\r
+ &TempFileName\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+ StrCpy (TempFileName, FileName);\r
+ FileName = TempFileName;\r
+\r