修复coredump-tool数据读取不全的问题

This commit is contained in:
linxin
2023-07-19 17:29:10 +08:00
parent 37a2f20d3b
commit 657cca128e
2 changed files with 16 additions and 1 deletions

View File

@@ -359,6 +359,21 @@ func main() {
//write coredump info
err = writeCoreConfig(coredump_config)
if err != nil {
journal.Print(journal.PriErr, err.Error())
}
flag, err = isDiskSufficient(pipe_config)
if err != nil {
journal.Print(journal.PriErr, "Can't judge disk's space is sufficient or not. "+err.Error())
return
}
if !flag {
journal.Print(journal.PriErr, "Disk space exceeds limit after write coredump!")
err := os.RemoveAll(pipe_config.Storage)
if err != nil {
journal.Print(journal.PriErr, err.Error())
return
}
journal.Print(journal.PriInfo, err.Error())
return
}
}

View File

@@ -70,7 +70,7 @@ func WalkDirectory(dir string) {
})
if err != nil {
return err
fmt.Printf("Error walking directory %s: %v\n", path, err)
}
}