VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp@ 43138

Last change on this file since 43138 was 28800, checked in by vboxsync, 14 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1/* $Id: hardenedmain.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
2/** @file
3 * VirtualBox - Hardened main().
4 */
5
6/*
7 * Copyright (C) 2008 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#include <string.h>
19#include <VBox/sup.h>
20
21
22int main(int argc, char **argv, char **envp)
23{
24 /*
25 * First check whether we're about to start a VM.
26 */
27 uint32_t fFlags = SUPSECMAIN_FLAGS_DONT_OPEN_DEV;
28 for (int i = 1; i < argc; i++)
29 /* NOTE: the check here must match the corresponding check for the
30 * options to start a VM in main.cpp and VBoxGlobal.cpp exactly,
31 * otherwise there will be weird error messages. */
32 if ( !::strcmp(argv[i], "--startvm")
33 || !::strcmp(argv[i], "-startvm"))
34 {
35 fFlags &= ~SUPSECMAIN_FLAGS_DONT_OPEN_DEV;
36 break;
37 }
38
39 return SUPR3HardenedMain("VirtualBox", fFlags, argc, argv, envp);
40}
41
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use