Skip to content

Commit 13a64c7

Browse files
authored
feat(qdl): prevent eraseLun if listed partitions not found (#111)
1 parent b2c1cf4 commit 13a64c7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/qdl.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Firehose } from "./firehose"
22
import { GPT } from "./gpt"
33
import { Sahara } from "./sahara";
44
import * as Sparse from "./sparse";
5-
import { concatUint8Array, containsBytes } from "./utils";
65
import { createLogger } from "./logger";
76

87
const logger = createLogger("qdl");
@@ -170,8 +169,8 @@ export class qdlDevice {
170169
if (name === "mbr" || name === "gpt") continue;
171170
const part = primaryGpt.locatePartition(name);
172171
if (!part) {
173-
logger.warn(`Partition ${name} not found in GPT`);
174-
continue;
172+
logger.error(`Partition ${name} not found in GPT`);
173+
return false;
175174
}
176175
protectedRanges.push({ name, start: part.start, end: part.end });
177176
}

0 commit comments

Comments
 (0)