Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2015-04-23 17:28:14 +0000
committerArun Thondapu2015-04-27 16:55:44 +0000
commit5f10f2553097d7b773d3efae68e77662521669b1 (patch)
tree4b69d80fd5d6fa03f4b18ab30cbf920937bab13e
parent744da9f96e2bf1b211ec976f8f8938095efbdaf1 (diff)
downloadrt.equinox.framework-5f10f2553097d7b773d3efae68e77662521669b1.tar.gz
rt.equinox.framework-5f10f2553097d7b773d3efae68e77662521669b1.tar.xz
rt.equinox.framework-5f10f2553097d7b773d3efae68e77662521669b1.zip
Bug 465333 - CLI arguments not taken into account
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipse.c2
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipseMain.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
index ca6891f20..25d6757f0 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
@@ -285,7 +285,7 @@ static _TCHAR* timeoutString = NULL; /* timeout value for opening a file */
static _TCHAR* defaultAction = NULL; /* default action for non '-' command line arguments */
static _TCHAR* iniFile = NULL; /* the launcher.ini file set if --launcher.ini was specified */
static _TCHAR* gtkVersionString = NULL; /* GTK+ version specified by --launcher.GTK_version */
-static _TCHAR* protectMode = NULL; /* The protection mode */
+static _TCHAR* protectMode = NULL; /* Process -protectMode to trigger the reading of the eclipse.ini in the configuration (at this point mac specific) */
/* variables for ee options */
static _TCHAR* eeExecutable = NULL;
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipseMain.c b/features/org.eclipse.equinox.executable.feature/library/eclipseMain.c
index 195ecfa62..a2d7478fe 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipseMain.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipseMain.c
@@ -58,7 +58,7 @@ static _TCHAR** userVMarg = NULL; /* user specific args for the Java V
static _TCHAR* programDir = NULL; /* directory where program resides */
static _TCHAR* officialName = NULL;
static int suppressErrors = 0; /* supress error dialogs */
-static int protectRoot = 0; /* check if launcher was run as root */
+static int protectRoot = 0; /* check if launcher was run as root. This argument is also handled in eclipse.c */
static int createUserArgs(int configArgc, _TCHAR **configArgv, int *argc, _TCHAR ***argv);
static void parseArgs( int* argc, _TCHAR* argv[], int handleVMArgs );
@@ -271,7 +271,7 @@ static _TCHAR* findProgram(_TCHAR* argv[]) {
/*
* Parse arguments of the command.
*/
-static void parseArgs( int* pArgc, _TCHAR* argv[], int handleVMargs )
+static void parseArgs( int* pArgc, _TCHAR* argv[], int useVMargs )
{
int index;
@@ -280,8 +280,10 @@ static void parseArgs( int* pArgc, _TCHAR* argv[], int handleVMargs )
/* For each user defined argument */
for (index = 0; index < *pArgc; index++){
- if(handleVMargs == 1 && _tcsicmp(argv[index], VMARGS) == 0) {
- userVMarg = &argv[ index+1 ];
+ if(_tcsicmp(argv[index], VMARGS) == 0) {
+ if (useVMargs == 1) { //Use the VMargs as the user specified vmArgs
+ userVMarg = &argv[ index+1 ];
+ }
argv[ index ] = NULL;
*pArgc = index;
} else if(_tcsicmp(argv[index], NAME) == 0) {

Back to the top