\r
DpEnd = AppendDevicePathNode (NULL, NULL);\r
if (DpEnd == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. DpEnd is NULL.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. DpEnd is NULL.\n", __func__));\r
Status = EFI_OUT_OF_RESOURCES;\r
goto CLEANUP;\r
}\r
(EFI_DEVICE_PATH_PROTOCOL *)&UsbDp\r
);\r
if (Dp == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. Dp is NULL.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. Dp is NULL.\n", __func__));\r
Status = EFI_OUT_OF_RESOURCES;\r
goto CLEANUP;\r
}\r
OptionalDataSize\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Error creating load option. Status = %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: Error creating load option. Status = %r\n", __func__, Status));\r
goto CLEANUP;\r
}\r
\r
NewOptionValid = TRUE;\r
- DEBUG ((DEBUG_VERBOSE, "%a: Generic USB Class Device boot option created.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_VERBOSE, "%a: Generic USB Class Device boot option created.\n", __func__));\r
Status = EfiBootManagerLoadOptionToVariable (&NewOption);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Error Saving boot option NV variable. Status = %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: Error Saving boot option NV variable. Status = %r\n", __func__, Status));\r
goto CLEANUP;\r
}\r
\r
&(BootNextValue)\r
);\r
\r
- DEBUG ((DEBUG_VERBOSE, "%a - Set BootNext Status (%r)\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - Set BootNext Status (%r)\n", __func__, Status));\r
\r
CLEANUP:\r
if (Dp != NULL) {\r
(VOID **)&LoadedImage\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_WARN, "%a - Failed to locate DevicePath for loaded image. %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_WARN, "%a - Failed to locate DevicePath for loaded image. %r\n", __func__, Status));\r
return NULL;\r
}\r
\r
// Make sure we didn't get any weird data.\r
//\r
if (DirectorySlashOffset == 0) {\r
- DEBUG ((DEBUG_ERROR, "%a - Weird 0-length string when processing app path.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a - Weird 0-length string when processing app path.\n", __func__));\r
goto Exit;\r
}\r
\r
// Let's check and make sure that's right.\r
//\r
if (AppPath[DirectorySlashOffset] != L'\\') {\r
- DEBUG ((DEBUG_ERROR, "%a - Could not find a single directory separator in app path.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a - Could not find a single directory separator in app path.\n", __func__));\r
goto Exit;\r
}\r
\r
FreePool (FileDevicePath);\r
}\r
\r
- DEBUG ((DEBUG_VERBOSE, "%a - Returning %d\n", __FUNCTION__, !EFI_ERROR (Status)));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - Returning %d\n", __func__, !EFI_ERROR (Status)));\r
\r
return (!EFI_ERROR (Status));\r
}\r
//\r
Status = ShellDeleteFile (&FileHandle);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a failed to delete file %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a failed to delete file %r\n", __func__, Status));\r
}\r
}\r
\r
0\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __func__, Status));\r
goto Exit;\r
}\r
\r
// Write the data to the file.\r
//\r
WriteCount = SaveStateSize;\r
- DEBUG ((DEBUG_INFO, "%a - Writing %d bytes to file...\n", __FUNCTION__, WriteCount));\r
+ DEBUG ((DEBUG_INFO, "%a - Writing %d bytes to file...\n", __func__, WriteCount));\r
Status = ShellWriteFile (\r
FileHandle,\r
&WriteCount,\r
);\r
\r
if (EFI_ERROR (Status) || (WriteCount != SaveStateSize)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Writing to file failed! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Writing to file failed! %r\n", __func__, Status));\r
} else {\r
- DEBUG ((DEBUG_INFO, "%a - SUCCESS!\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a - SUCCESS!\n", __func__));\r
}\r
\r
//\r
0\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __func__, Status));\r
goto Exit;\r
} else {\r
IsFileOpened = TRUE;\r
//\r
Status = ShellGetFileSize (FileHandle, &LargeFileSize);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to determine file size! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to determine file size! %r\n", __func__, Status));\r
goto Exit;\r
}\r
\r
*SaveStateSize = FileSize;\r
Buffer = AllocatePool (FileSize);\r
if (Buffer == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to allocate a pool to hold the file contents! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to allocate a pool to hold the file contents! %r\n", __func__, Status));\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Exit;\r
}\r
//\r
Status = ShellReadFile (FileHandle, &FileSize, Buffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to read the file contents! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to read the file contents! %r\n", __func__, Status));\r
}\r
\r
Exit:\r