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