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.2~410^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92b19938f596a08107ddc2f00b3188958052bae7;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 --- diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index de6cc8d3e3..fd78b8d64d 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -315,7 +315,6 @@ static int emulator_main(int argc, char *argv[], char **envp) } #endif - gchar *profile = NULL; gchar *conf = NULL; int c = 0; @@ -330,7 +329,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 } }; @@ -348,10 +346,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); @@ -362,21 +356,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_os(_qemu_argv[0]); - if (!load_profile_default(conf, profile)) { + if (!load_conf(conf)) { return -1; } @@ -401,7 +394,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 d1f159114e..9926061b56 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" @@ -183,7 +184,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); @@ -208,18 +209,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 = -1; 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"); @@ -362,7 +361,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 1ac865850b..f3d3a46945 100644 --- a/tizen/src/emulator_options.h +++ b/tizen/src/emulator_options.h @@ -36,8 +36,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__ */