summaryrefslogtreecommitdiffstats
path: root/src/global.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/global.go')
-rw-r--r--src/global.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/global.go b/src/global.go
index b6635c9..349ba6c 100644
--- a/src/global.go
+++ b/src/global.go
@@ -14,11 +14,12 @@ const (
14 FILEOPEN 14 FILEOPEN
15 FILECLOSE 15 FILECLOSE
16 FILEWRITE 16 FILEWRITE
17 PIVOTROOT
17 TYPENUM 18 TYPENUM
18) 19)
19 20
20func (et eventType) String() string { 21func (et eventType) String() string {
21 names := []string{"NEWPID", "PIDEXIT", "EXECVE", "FILEOPEN", "FILECLOSE", "FILEWRITE", "TYPENUM"} 22 names := []string{"NEWPID", "PIDEXIT", "EXECVE", "FILEOPEN", "FILECLOSE", "FILEWRITE", "PIVOTROOT", "TYPENUM"}
22 if et < NEWPID || et > TYPENUM { 23 if et < NEWPID || et > TYPENUM {
23 return "Unknown" 24 return "Unknown"
24 } 25 }
@@ -32,12 +33,13 @@ type Event struct {
32 ppid, parentTgid int 33 ppid, parentTgid int
33 syscall int 34 syscall int
34 syscallParam [4]uint64 35 syscallParam [4]uint64
35 pathName string
36 argc int 36 argc int
37 argv []string 37 argv []string
38 cwd string 38 cwd string
39 exit_code uint64 39 exit_code uint64
40 exit_signal int 40 exit_signal int
41 srcPath string
42 destPath string
41} 43}
42 44
43var wg sync.WaitGroup // 掌管协程 45var wg sync.WaitGroup // 掌管协程