From: SeokYeon Hwang Date: Thu, 28 May 2015 07:44:49 +0000 (+0900) Subject: emulator: removed "--profile" argument X-Git-Tag: Tizen_Studio_1.3_Release_p2.3~41^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d39c9d3173226f420dc5268c03757dc03909fc2;p=sdk%2Femulator%2Fqemu.git emulator: removed "--profile" argument Removed "--profile" argument. It is not necessary anymore. Change-Id: Ie0f93d44b4548c325bf5a87b44a0f9759164538a Signed-off-by: SeokYeon Hwang (cherry picked from commit 92b19938f596a08107ddc2f00b3188958052bae7) Signed-off-by: Sooyoung Ha --- diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index 3f4f29ac61..bfc189b39a 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -332,7 +332,6 @@ static int emulator_main(int argc, char *argv[], char **envp) } #endif - gchar *profile = NULL; gchar *conf = NULL; int c = 0; @@ -347,7 +346,6 @@ static int emulator_main(int argc, char *argv[], char **envp) while (c != -1) { static struct option long_options[] = { {"conf", required_argument, 0, 'c' }, - {"profile", required_argument, 0, 'p' }, {"additional", required_argument, 0, 'a' }, {0, 0, 0, 0 } }; @@ -365,10 +363,6 @@ static int emulator_main(int argc, char *argv[], char **envp) set_variable("conf", optarg, true); conf = g_strdup(optarg); break; - case 'p': - set_variable("profile", optarg, true); - profile = g_strdup(optarg); - break; case 'a': // TODO: additional options should be accepted set_variable("additional", optarg, true); @@ -379,21 +373,20 @@ static int emulator_main(int argc, char *argv[], char **envp) } } - if (!profile && !conf) { - fprintf(stderr, "Usage: %s {-c|--conf} conf_file ...\n" - " %s {-p|--profile} profile ...\n", - basename(argv[0]), basename(argv[0])); + if (!conf) { + fprintf(stderr, "Usage: %s {-c|--conf} conf_file ...\n", + basename(argv[0])); return -1; } - // load profile configurations + // load configurations _qemu_argc = 0; _qemu_argv[_qemu_argc++] = g_strdup(argv[0]); set_bin_path(_qemu_argv[0]); - if (!load_profile_default(conf, profile)) { + if (!load_conf(conf)) { return -1; } @@ -418,7 +411,7 @@ static int emulator_main(int argc, char *argv[], char **envp) } // assemble arguments for qemu and skin - if (!assemble_profile_args(&_qemu_argc, _qemu_argv, + if (!assemble_emulator_args(&_qemu_argc, _qemu_argv, &_skin_argc, _skin_argv)) { return -1; } diff --git a/tizen/src/emulator_options.c b/tizen/src/emulator_options.c index 638818313e..cd47a77c6e 100644 --- a/tizen/src/emulator_options.c +++ b/tizen/src/emulator_options.c @@ -27,6 +27,7 @@ */ #include +#include #include "qemu/queue.h" #include "emulator_options.h" @@ -172,7 +173,7 @@ static char *substitute_variables(char *src) if(!value) { fprintf(stderr, "[%s] is not set." " Please input value using commandline argument" - " \"--%s\" or profile default file or envirionment" + " \"--%s\" or conf file or envirionment" " variable.\n", name, name); value = (char *)""; set_variable(name, value, false); @@ -197,18 +198,16 @@ static char *substitute_variables(char *src) return str; } -bool load_profile_default(const char * const conf, const char * const profile) +bool load_conf(const char * const conf) { int classification = 0; char str[LINE_LIMIT]; char *filename; FILE *file = NULL; - // if "conf" is exist, ignore "profile" + assert(!!conf); if (conf) { filename = g_strdup(conf); - } else { - filename = g_strdup_printf("%s/%s.conf", get_bin_path(), profile); } file = fopen(filename, "r"); @@ -344,7 +343,7 @@ static bool assemble_args(int *argc, char **argv, return true; } -bool assemble_profile_args(int *qemu_argc, char **qemu_argv, +bool assemble_emulator_args(int *qemu_argc, char **qemu_argv, int *skin_argc, char **skin_argv) { if (!assemble_args(qemu_argc, qemu_argv, diff --git a/tizen/src/emulator_options.h b/tizen/src/emulator_options.h index ee9a898906..58f7867af7 100644 --- a/tizen/src/emulator_options.h +++ b/tizen/src/emulator_options.h @@ -34,8 +34,8 @@ void set_variable(const char * const arg1, const char * const arg2, bool override); char *get_variable(const char * const name); void reset_variables(void); -bool load_profile_default(const char * const conf, const char * const profile); -bool assemble_profile_args(int *qemu_argc, char **qemu_argv, +bool load_conf(const char * const conf); +bool assemble_emulator_args(int *qemu_argc, char **qemu_argv, int *skin_argc, char **skin_argv); #endif /* __EMULATOR_OPTIONS_H__ */