From a2432010c74f77c046052601230653dc4701c5ba Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Tue, 12 Apr 2016 13:39:10 +0200 Subject: [PATCH] Add mount install option handling to pkgmgr_installer API Change-Id: Ie8b97d9fcbb1d33eacc142a7768766b8823b0e8d --- installer/pkgmgr_installer.c | 6 ++++++ installer/pkgmgr_installer.h | 3 ++- installer/pkgmgr_installer_config.h | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/installer/pkgmgr_installer.c b/installer/pkgmgr_installer.c index c076713..55a1fbd 100644 --- a/installer/pkgmgr_installer.c +++ b/installer/pkgmgr_installer.c @@ -388,6 +388,12 @@ pkgmgr_installer_receive_request(pkgmgr_installer *pi, pi->pkgmgr_info = strndup(optarg, MAX_STRLEN); break; + case 'w': /* pkgid for mount installation */ + mode = 'w'; + pi->request_type = PKGMGR_REQ_MOUNT_INSTALL; + pi->pkgmgr_info = strndup(optarg, MAX_STRLEN); + break; + case 'b': /* recovery */ if (mode) { r = -EINVAL; diff --git a/installer/pkgmgr_installer.h b/installer/pkgmgr_installer.h index f747cd6..31938eb 100644 --- a/installer/pkgmgr_installer.h +++ b/installer/pkgmgr_installer.h @@ -89,7 +89,8 @@ enum { PKGMGR_REQ_ENABLE_APP = 11, PKGMGR_REQ_DISABLE_APP = 12, PKGMGR_REQ_ENABLE_APP_SPLASH_SCREEN = 13, - PKGMGR_REQ_DISABLE_APP_SPLASH_SCREEN = 14 + PKGMGR_REQ_DISABLE_APP_SPLASH_SCREEN = 14, + PKGMGR_REQ_MOUNT_INSTALL = 15 }; enum { diff --git a/installer/pkgmgr_installer_config.h b/installer/pkgmgr_installer_config.h index 2aeb12c..6c7fea2 100644 --- a/installer/pkgmgr_installer_config.h +++ b/installer/pkgmgr_installer_config.h @@ -35,7 +35,7 @@ extern "C" { #define OPTVAL_FORCE_REMOVAL 1001 /* Supported options */ -const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:b:e:M:y:q"; +const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:b:e:M:y:w:q"; const struct option long_opts[] = { { "session-id", 1, NULL, 'k' }, { "license-path", 1, NULL, 'l' }, @@ -51,6 +51,7 @@ const struct option long_opts[] = { { "tep-move", 1, NULL, 'M' }, { "smack", 1, NULL, 's' }, { "direct-manifest-install", 1, NULL, 'y' }, + { "mount-install", 1, NULL, 'w' }, { "recovery", 1, NULL, 'b' }, { "preload", 0, NULL, OPTVAL_PRELOAD }, { "force-remove", 0, NULL, OPTVAL_FORCE_REMOVAL }, -- 2.7.4