pi->pkgmgr_info = strndup(optarg, MAX_STRLEN);
break;
+ case 'b': /* recovery */
+ if (mode) {
+ r = -EINVAL;
+ goto RET;
+ }
+ mode = 'b';
+ pi->request_type = PKGMGR_REQ_RECOVER;
+ if (pi->pkgmgr_info)
+ free(pi->pkgmgr_info);
+ pi->pkgmgr_info = strndup(optarg, MAX_STRLEN);
+ break;
+
/* Otherwise */
case '?': /* Not an option */
break;
#endif
/* Supported options */
-const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:e:M:y:q";
+const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:b:e:M:y:q";
const struct option long_opts[] = {
{ "session-id", 1, NULL, 'k' },
{ "license-path", 1, NULL, 'l' },
{ "tep-move", 1, NULL, 'M' },
{ "smack", 1, NULL, 's' },
{ "direct-manifest-install", 1, NULL, 'y' },
+ { "recovery", 1, NULL, 'b' },
{ 0, 0, 0, 0 } /* sentinel */
};