}
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;
}