aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/mgrconfig
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/mgrconfig')
-rw-r--r--pkg/mgrconfig/config.go4
-rw-r--r--pkg/mgrconfig/load.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go
index 2ea0d8ad9..f4857e613 100644
--- a/pkg/mgrconfig/config.go
+++ b/pkg/mgrconfig/config.go
@@ -152,7 +152,7 @@ type Config struct {
// "pcs": specify raw PC table files name.
// Each line of the file should be: "64-bit-pc:32-bit-weight\n".
// eg. "0xffffffff81000000:0x10\n"
- CovFilter covFilterCfg `json:"cover_filter,omitempty"`
+ CovFilter CovFilterCfg `json:"cover_filter,omitempty"`
// For each prog in the corpus, remember the raw array of PCs obtained from the kernel.
// It can be useful for debugging syzkaller descriptions and syzkaller itself.
@@ -242,7 +242,7 @@ type Subsystem struct {
Paths []string `json:"path"`
}
-type covFilterCfg struct {
+type CovFilterCfg struct {
Files []string `json:"files,omitempty"`
Functions []string `json:"functions,omitempty"`
RawPCs []string `json:"pcs,omitempty"`
diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go
index aa22b3ea8..76a0bcf14 100644
--- a/pkg/mgrconfig/load.go
+++ b/pkg/mgrconfig/load.go
@@ -260,8 +260,8 @@ func checkNonEmpty(fields ...string) error {
return nil
}
-func (cfg *Config) HasCovFilter() bool {
- return len(cfg.CovFilter.Functions)+len(cfg.CovFilter.Files)+len(cfg.CovFilter.RawPCs) != 0
+func (cov *CovFilterCfg) Empty() bool {
+ return len(cov.Functions)+len(cov.Files)+len(cov.RawPCs) == 0
}
func (cfg *Config) CompleteKernelDirs() {