"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
try {
using namespace ode;
- if (argc < 2) {
+ if (argc < 2 || argc > 3) {
usage();
return EXIT_FAILURE;
}
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);