aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vmimpl/freebsd.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-21 16:08:02 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-21 16:08:02 +0100
commitd60b9c6b0ec77c5d458a17467f1b4939cc2f6812 (patch)
treecfc0a0b8ada856f1150d73700645e0e61c72ff74 /vm/vmimpl/freebsd.go
parenta2d5b1c04d22c7db220cc795dc2b4d48b17437be (diff)
vm/vmimpl: refactor DiagnoseFree/OpenBSD
Make signatures of these functions match vm.Diagnose. Both more flexible, less code, more reasonable.
Diffstat (limited to 'vm/vmimpl/freebsd.go')
-rw-r--r--vm/vmimpl/freebsd.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm/vmimpl/freebsd.go b/vm/vmimpl/freebsd.go
index c6074028a..f2ebfba56 100644
--- a/vm/vmimpl/freebsd.go
+++ b/vm/vmimpl/freebsd.go
@@ -12,7 +12,7 @@ import (
// is expected to be connected to a panicked FreeBSD kernel. If kernel
// just hanged, we've lost connection or detected some non-panic
// error, console still shows normal login prompt.
-func DiagnoseFreeBSD(w io.Writer) bool {
+func DiagnoseFreeBSD(w io.Writer) ([]byte, bool) {
commands := []string{
"",
"set $lines = 0", // disable pagination
@@ -28,5 +28,5 @@ func DiagnoseFreeBSD(w io.Writer) bool {
w.Write([]byte(c + "\n"))
time.Sleep(1 * time.Second)
}
- return true
+ return nil, true
}