/* Backup function for HDiskImage. Only a few fields need to be backup. This is for making the Disk buffer refresh as few as possible. */
EFI_STATUS HDiskImageBackup(VOID)
/* Backup function for HDiskImage. Only a few fields need to be backup. This is for making the Disk buffer refresh as few as possible. */
EFI_STATUS HDiskImageBackup(VOID)
{
  SHELL_FREE_NON_NULL (HDiskImageBackupVar.Name);
  HDiskImageBackupVar.Name = CatSPrint (NULL, L"%s", HDiskImage.Name);
  if (HDiskImageBackupVar.Name == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }
  HDiskImageBackupVar.Offset = HDiskImage.Offset;
  HDiskImageBackupVar.Size   = HDiskImage.Size;
  return EFI_SUCCESS;
}