mirror of
https://github.com/bkerler/edl.git
synced 2024-11-14 19:14:58 -05:00
fix erase to return when erase success
This commit is contained in:
parent
2ed24c090f
commit
cd450cb4fa
2 changed files with 6 additions and 9 deletions
|
@ -831,7 +831,6 @@ class firehose_client(metaclass=LogBase):
|
||||||
luns = self.getluns(options)
|
luns = self.getluns(options)
|
||||||
partitionname = options["<partitionname>"]
|
partitionname = options["<partitionname>"]
|
||||||
partitions = partitionname.split(",")
|
partitions = partitionname.split(",")
|
||||||
error = False
|
|
||||||
for lun in luns:
|
for lun in luns:
|
||||||
data, guid_gpt = self.firehose.get_gpt(lun, int(options["--gpt-num-part-entries"]),
|
data, guid_gpt = self.firehose.get_gpt(lun, int(options["--gpt-num-part-entries"]),
|
||||||
int(options["--gpt-part-entry-size"]),
|
int(options["--gpt-part-entry-size"]),
|
||||||
|
@ -847,14 +846,10 @@ class firehose_client(metaclass=LogBase):
|
||||||
self.printer(
|
self.printer(
|
||||||
f"Erased {partitionname} starting at sector {str(partition.sector)} " +
|
f"Erased {partitionname} starting at sector {str(partition.sector)} " +
|
||||||
f"with sector count {str(partition.sectors)}.")
|
f"with sector count {str(partition.sectors)}.")
|
||||||
else:
|
return True
|
||||||
self.printer(
|
self.printer(
|
||||||
f"Couldn't erase partition {partitionname}. Either wrong memorytype given or no gpt partition.")
|
f"Couldn't erase partition {partitionname}. Either wrong memorytype given or no gpt partition.")
|
||||||
error = True
|
return False
|
||||||
continue
|
|
||||||
if error:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
elif cmd == "ep":
|
elif cmd == "ep":
|
||||||
if not self.check_param(["<partitionname>", "<sectors>"]):
|
if not self.check_param(["<partitionname>", "<sectors>"]):
|
||||||
return False
|
return False
|
||||||
|
|
2
test_script.sh
Executable file
2
test_script.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
./edl w xbl_a /home/bongb/web_qdl/agnos_images/xbl.img
|
||||||
|
./edl reset
|
Loading…
Reference in a new issue