tstGlobalConfig.cpp revision 43747b1f0bc8302a238fb35e55857a5e9aa1933d
/* $Id$ */
/** @file
* Ring-3 Management program for the GCFGM mock-up.
*/
/*
* Copyright (C) 2007 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.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <iprt/initterm.h>
/**
* Prints the usage and returns 1.
* @return 1
*/
static int Usage(void)
{
RTPrintf("usage: tstGlobalConfig <value-name> [new value]\n");
return 1;
}
{
RTR3Init();
/*
* Parse args, building the request as we do so.
*/
if (argc <= 1)
return Usage();
if (argc > 3)
{
RTPrintf("syntax error: too many arguments\n");
Usage();
return 1;
}
/* arg[1] = szName */
{
return 1;
}
{
return 1;
}
/* argv[2] = u64SetValue; optional */
if (argc == 3)
{
{
RTPrintf("syntax error: '%s' didn't convert successfully to a number. (%Rrc,'%s')\n", argv[2], rc, pszNext);
return 1;
}
}
/*
* Open the session, load ring-0 and issue the request.
*/
if (RT_FAILURE(rc))
{
return 1;
}
if (RT_SUCCESS(rc))
{
if (RT_SUCCESS(rc))
{
if (enmOp == VMMR0_DO_GCFGM_QUERY_VALUE)
else
}
else if (enmOp == VMMR0_DO_GCFGM_QUERY_VALUE)
else
}
SUPR3Term(false /*fForced*/);
}