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) {
|
int Main(int argc, char **argv) {
|
||||||
try {
|
try {
|
||||||
// try-catch start
|
// try-catch start
|
||||||
Helper::LoggingProperties::setProgramName("pmt");
|
Helper::LoggingProperties::setProgramName(argv[0]);
|
||||||
collector.closeAfterProgress(pstdout);
|
collector.closeAfterProgress(pstdout);
|
||||||
collector.closeAfterProgress(pstderr);
|
collector.closeAfterProgress(pstderr);
|
||||||
|
|
||||||
@@ -145,6 +145,11 @@ int Main(int argc, char **argv) {
|
|||||||
"directory with -S "
|
"directory with -S "
|
||||||
"(--search-path)");
|
"(--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 (!Helper::hasSuperUser()) {
|
||||||
if (!((FuncManager.isUsed("rebootFunction") &&
|
if (!((FuncManager.isUsed("rebootFunction") &&
|
||||||
Helper::hasAdbPermissions()) ||
|
Helper::hasAdbPermissions()) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user