tstGlobalConfig.cpp revision 86b51be433c7032578ae50e94ebe590cc428448b
/* $Id$ */
/** @file
* Ring-3 Management program for the GCFGM mock-up.
*/
/*
* Copyright (C) 2007 innotek GmbH
*
* 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 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(false, 0);
/*
* 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
}
SUPTerm(false /* not forced */);
}