aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/subsystem/entity
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-01-11 19:37:37 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-02-10 14:34:44 +0100
commit4c1f201b6fc2cc30625d3c706b1f45cc68ef0223 (patch)
tree57f61c8bbb0c9792e58f0b368539b390725edb4b /pkg/subsystem/entity
parent2246b3b0ea578783224118ca3af660ecb0ebd2b6 (diff)
pkg/subsystem/linux: add the basic subsystem extraction code
Diffstat (limited to 'pkg/subsystem/entity')
-rw-r--r--pkg/subsystem/entity/entities.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/subsystem/entity/entities.go b/pkg/subsystem/entity/entities.go
index 6d028e391..3bcdf8e93 100644
--- a/pkg/subsystem/entity/entities.go
+++ b/pkg/subsystem/entity/entities.go
@@ -4,7 +4,11 @@
package entity
type Subsystem struct {
- PathRules []PathRule
+ Name string
+ PathRules []PathRule
+ Syscalls []string
+ Lists []string
+ Maintainers []string
}
// PathRule describes the part of the directory tree belonging to a single subsystem.
@@ -13,3 +17,7 @@ type PathRule struct {
// ExcludeRegexps are tested before IncludeRegexp.
ExcludeRegexp string
}
+
+func (pr *PathRule) IsEmpty() bool {
+ return pr.IncludeRegexp == "" && pr.ExcludeRegexp == ""
+}