| 426 | } |
| 427 | |
| 428 | bool removePartition(LauncherPartitionTable &table, const LauncherPartitionEntry &target) { |
| 429 | int index = findEntryIndex(table, target); |
| 430 | if (index < 0) return false; |
| 431 | if (isProtectedPartition(table.entries[index])) { |
| 432 | displayRedStripe("Protected partition"); |
| 433 | launcherDelayMs(2000); |
| 434 | return false; |
| 435 | } |
| 436 | if (!confirmAction("Remove partition?")) return false; |
| 437 | |
| 438 | LauncherPartitionTable edited = table; |
| 439 | edited.entries.erase(edited.entries.begin() + index); |
| 440 | if (!validateOrShow(edited)) return false; |
| 441 | if (!compactOrShow(edited)) return false; |
| 442 | table = edited; |
| 443 | return true; |
| 444 | } |
| 445 | |
| 446 | bool formatPartition(const LauncherPartitionEntry &entry, bool dirty) { |
| 447 | if (dirty) { |
no test coverage detected