package pkg //"strconv" //"strings" //"github.rackspace.com/gorax/tools/util" //"log" //var ( // enabled = regexp.MustCompile(`(?i)description\s+(.*)`) //) //FSCK contains the state of FSCK type FSCK struct { Enabled *bool `json:"enabled"` } //BuildFSCKInfo will determine the FSCK state from the dumpe2fs data func BuildFSCKInfo(dumpe2fs Dumpe2fsInfo) (i FSCK, err error) { f := false t := true i.Enabled = &f for _, filesystem := range dumpe2fs.Info { if filesystem.MaximumMountCount != -1 { i.Enabled = &t } if filesystem.CheckInterval != 0 { i.Enabled = &t } if filesystem.FilesystemState != "clean" { i.Enabled = &t } } return }