summaryrefslogtreecommitdiff
path: root/util/autoport/log_reader.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/autoport/log_reader.go')
-rw-r--r--util/autoport/log_reader.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/autoport/log_reader.go b/util/autoport/log_reader.go
index 58f1182ec3..c94d182b49 100644
--- a/util/autoport/log_reader.go
+++ b/util/autoport/log_reader.go
@@ -359,6 +359,22 @@ func (l *LogDevReader) GetCPUModel() (ret []uint32) {
return
}
+func (l *LogDevReader) HasPS2() bool {
+ file, err := os.Open(l.InputDirectory + "/input_bustypes.log")
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer file.Close()
+ scanner := bufio.NewScanner(file)
+ for scanner.Scan() {
+ line := scanner.Text()
+ if strings.Index(line, "0011") >= 0 {
+ return true
+ }
+ }
+ return false
+}
+
var FlagLogInput = flag.String("input_log", ".", "Input log directory")
var FlagLogMkLogs = flag.Bool("make_logs", false, "Dump logs")