Small fix for GetAllCgroups().
Incorrect parsing of length of fields. Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
This commit is contained in:
parent
47d9567ccf
commit
de63d7006b
|
@ -97,7 +97,7 @@ func GetAllSubsystems() ([]string, error) {
|
|||
text := s.Text()
|
||||
if text[0] != '#' {
|
||||
parts := strings.Fields(text)
|
||||
if len(parts) > 4 && parts[3] != "0" {
|
||||
if len(parts) >= 4 && parts[3] != "0" {
|
||||
subsystems = append(subsystems, parts[0])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue