From c15dfdb55cc4702f2ab8d20b5bd1b4ebb0b29d61 Mon Sep 17 00:00:00 2001 From: greatim Date: Wed, 30 Nov 2016 16:22:59 +0900 Subject: [PATCH] modify default app command behavior for uninstall command modify default app command behavior for uninstall command Change-Id: I8acbd3761af9672f6d51a2f94330bfe3509938da Signed-off-by: greatim --- src/default_plugin_appcmd.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/default_plugin_appcmd.c b/src/default_plugin_appcmd.c index 3fd2f64..4bc158e 100644 --- a/src/default_plugin_appcmd.c +++ b/src/default_plugin_appcmd.c @@ -95,22 +95,20 @@ static int appcmd_install_gen_shellcmd(appcmd_info* p_info) { } static int appcmd_uninstall_gen_shellcmd(appcmd_info* p_info) { - char *type = NULL; char *pkgid = NULL; char *buf = p_info->shell_cmd; int len = sizeof(p_info->shell_cmd); - if (p_info->args_cnt != 3) { + if (p_info->args_cnt != 2) { D("failed to parse appcmd.(cnt=%d)\n", p_info->args_cnt); return -1; } - type = p_info->args[1]; - pkgid = p_info->args[2]; + pkgid = p_info->args[1]; - D("args: type=%s, pkgid=%s\n", type, pkgid); + D("args: pkgid=%s\n", pkgid); - snprintf(buf, len, "pkgcmd -u -q -t %s -n %s", type, pkgid); + snprintf(buf, len, "pkgcmd -u -q -n %s", pkgid); return 0; } -- 2.7.4