/* Cloning a stream means copying all the values of the input Stream in the ClonedStream. */
EFI_STATUS EFIAPI AmlStreamClone(IN CONST AML_STREAM *Stream, OUT AML_STREAM *ClonedStream)
/* Cloning a stream means copying all the values of the input Stream in the ClonedStream. */
EFI_STATUS EFIAPI AmlStreamClone(IN CONST AML_STREAM *Stream, OUT AML_STREAM *ClonedStream)
{
  if (!IS_STREAM (Stream)   ||
      (ClonedStream == NULL))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  ClonedStream->Buffer        = Stream->Buffer;
  ClonedStream->MaxBufferSize = Stream->MaxBufferSize;
  ClonedStream->Index         = Stream->Index;
  ClonedStream->Direction     = Stream->Direction;
  return EFI_SUCCESS;
}