/* $Id$ */
/** @file
* VBox HDD container test utility - I/O data generator.
*/
/*
* Copyright (C) 2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "VDIoRnd.h"
/**
* I/O random data generator instance data.
*/
typedef struct VDIORND
{
/** Pointer to the buffer holding the random data. */
/** Size of the buffer. */
/** RNG */
} VDIORND;
{
if (pIoRnd)
if ( pIoRnd
{
if (RT_SUCCESS(rc))
{
}
else
{
}
}
else
{
if (pIoRnd)
rc = VERR_NO_MEMORY;
}
if (RT_SUCCESS(rc))
return rc;
}
{
}
{
return VERR_INVALID_PARAMETER;
*ppv = pIoRnd->pbPattern + RT_ALIGN_64(RTRandAdvU64Ex(pIoRnd->hRand, 0, pIoRnd->cbPattern - cb - 512), 512);
return VINF_SUCCESS;
}
{
}