mirror of https://github.com/eLvErDe/hwraid.git
Revert "[megaclisas-status] bug fix : properly detect unconfigured drives when they were previously part of an array"
This reverts commit 517b2d35cd
.
This commit is contained in:
parent
5b030031b3
commit
530b024ab0
|
@ -151,12 +151,9 @@ def returnRebuildProgress(output):
|
|||
def returnUnconfDriveNumber(output):
|
||||
confdrives = 0
|
||||
unconfdrives = 0
|
||||
totaldrivenumber = 0
|
||||
for line in output:
|
||||
if re.match(r'.*Number of PDs:.*$',line.strip()):
|
||||
totaldrivenumber += int(line.split(':')[2].strip())
|
||||
if re.match(r'^Firmware state:.*$',line.strip()):
|
||||
confdrives += 1
|
||||
confdrives += int(line.split(':')[2].strip())
|
||||
unconfdrives = totaldrivenumber - confdrives
|
||||
return int(unconfdrives)
|
||||
|
||||
|
|
Loading…
Reference in New Issue