MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / removePartition

Function removePartition

src/partitioner.cpp:428–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428bool 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
446bool formatPartition(const LauncherPartitionEntry &entry, bool dirty) {
447 if (dirty) {

Callers 1

partListFunction · 0.85

Calls 8

findEntryIndexFunction · 0.85
isProtectedPartitionFunction · 0.85
displayRedStripeFunction · 0.85
launcherDelayMsFunction · 0.85
confirmActionFunction · 0.85
validateOrShowFunction · 0.85
compactOrShowFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected