From: seolheui kim Date: Thu, 5 Jul 2018 09:11:23 +0000 (+0900) Subject: Add ode-fota input argument for mount path X-Git-Tag: submit/tizen_4.0/20180705.094417^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb6a22d4eb1998055b172e2362a55fa44cd83835;p=platform%2Fcore%2Fsecurity%2Fode.git Add ode-fota input argument for mount path Change-Id: If6249abe4c5bb79293b4b7fcd69fc9fc0644f99d Signed-off-by: seolheui kim --- diff --git a/fota/fota.cpp b/fota/fota.cpp index 8ea9967..b71f6d9 100644 --- a/fota/fota.cpp +++ b/fota/fota.cpp @@ -126,8 +126,8 @@ void usage() "Usage: ode-fota [Operation]" << std::endl << std::endl << "Operations :" << std::endl << - " mount Mount internal memory using stored master key" << std::endl << - " remove Remove stored internal memory master key" << std::endl; + " mount [path] Mount internal memory using stored master key" << std::endl << + " remove Remove stored internal memory master key" << std::endl; } } // anonymous namespace @@ -137,7 +137,7 @@ int main(int argc, char* argv[]) try { using namespace ode; - if (argc < 2) { + if (argc < 2 || argc > 3) { usage(); return EXIT_FAILURE; } @@ -147,8 +147,11 @@ int main(int argc, char* argv[]) if (MOUNT == argv[1]) { auto masterKey = UpgradeSupport::loadMasterKey(devpath); + std::string path = INTERNAL_PATH; + if (argc == 3) + path = argv[2]; - DMCryptEngine dmcrypt(devpath, INTERNAL_PATH, ProgressBar([](int){})); + DMCryptEngine dmcrypt(devpath, path, ProgressBar([](int){})); // mount options are ignored by mount() dmcrypt.mount(masterKey, 0);