VBoxExtPackHelperApp.cpp revision 8ad4991aaa9695a98840f9d1f718417c59bedf8f
/* $Id$ */
/** @file
* VirtualBox Main - Extension Pack Helper Application, usually set-uid-to-root.
*/
/*
* Copyright (C) 2010 Oracle Corporation
*
* Oracle Corporation confidential
* All rights reserved
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "include/ExtPackUtil.h"
#include <iprt/buildconfig.h>
#include <iprt/initterm.h>
/* Override RTAssertShouldPanic to prevent gdb process creation. */
RTDECL(bool) RTAssertShouldPanic(void)
{
return true;
}
/**
* Implements the 'install' command.
*
* @returns The program exit code.
* @param argc The number of program arguments.
* @param argv The program arguments.
*/
{
return RTEXITCODE_FAILURE;
}
/**
* Implements the 'uninstall' command.
*
* @returns The program exit code.
* @param argc The number of program arguments.
* @param argv The program arguments.
*/
{
return RTEXITCODE_FAILURE;
}
{
if (RT_FAILURE(rc))
return RTMsgInitFailure(rc);
if (argc > 1)
{
/*
* Command string switch.
*/
else
{
/*
* Didn't match a command, check for standard options.
*/
if (RT_SUCCESS(rc))
{
for (;;)
{
switch (ch)
{
case 'h':
"All rights reserved.\n"
"\n"
"This NOT intended for general use, please use VBoxManage instead\n"
"or call the IExtPackManager API directly.\n"
"\n"
"Usage: %s <command> [options]\n"
"Commands:\n"
" install --base-dir <dir> --name <name> --tarball <tarball> --tarball-fd <fd>\n"
" uninstall --base-dir <dir> --name <name>\n"
, RTPathFilename(argv[0]));
break;
case 'V':
break;
default:
break;
}
}
}
else
}
}
else
RTMsgError("No command was specified\n");
return rcExit;
}