pmt: add control for -l flag
This commit is contained in:
@@ -75,7 +75,7 @@ static Helper::garbageCollector collector;
|
||||
int Main(int argc, char **argv) {
|
||||
try {
|
||||
// try-catch start
|
||||
Helper::LoggingProperties::setProgramName("pmt");
|
||||
Helper::LoggingProperties::setProgramName(argv[0]);
|
||||
collector.closeAfterProgress(pstdout);
|
||||
collector.closeAfterProgress(pstderr);
|
||||
|
||||
@@ -145,6 +145,11 @@ int Main(int argc, char **argv) {
|
||||
"directory with -S "
|
||||
"(--search-path)");
|
||||
|
||||
if (Variables->onLogical) {
|
||||
if (!Variables->PartMap->hasLogicalPartitions())
|
||||
throw Error("This device doesn't contains logical partitions. But you used -l (--logical) flag.");
|
||||
}
|
||||
|
||||
if (!Helper::hasSuperUser()) {
|
||||
if (!((FuncManager.isUsed("rebootFunction") &&
|
||||
Helper::hasAdbPermissions()) ||
|
||||
|
||||
Reference in New Issue
Block a user