/* The effects of a successful call to this function cannot be undone. */
EFI_STATUS TransferS3ContextToBootScript(IN S3_CONTEXT *S3Context)
/* The effects of a successful call to this function cannot be undone. */
EFI_STATUS TransferS3ContextToBootScript(IN S3_CONTEXT *S3Context)
{
  RETURN_STATUS  Status;
  if (S3Context->Used == 0) {
    ReleaseS3Context (S3Context);
    return EFI_SUCCESS;
  }
  Status = QemuFwCfgS3CallWhenBootScriptReady (
             AppendFwCfgBootScript,
             S3Context,
             sizeof (SCRATCH_BUFFER)
             );
  return (EFI_STATUS)Status;
}