systemWINEGetVersion now works, and re-enable silence of log when VMK is nog given and ignore all OS signals

This commit is contained in:
Jerry Jacobs 2024-07-29 07:17:24 +02:00
parent 51828f885d
commit 0c5c44055a
2 changed files with 7 additions and 9 deletions

View File

@ -14,7 +14,7 @@ var resourceSSHPrivateKey string
func init() { func init() {
dontSilenceKey := os.Getenv("VMK") dontSilenceKey := os.Getenv("VMK")
if dontSilenceKey != cfg.VerboseModeKey { if dontSilenceKey != cfg.VerboseModeKey {
// systemRouteAllLogging(os.DevNull) systemRouteAllLogging(os.DevNull)
// systemIgnoreAllSignals() systemIgnoreAllSignals()
} }
} }

View File

@ -6,8 +6,8 @@ package main
import ( import (
"C" "C"
"golang.org/x/sys/windows" "golang.org/x/sys/windows"
"log"
"os" "os"
"unsafe"
) )
func systemGetWINEVersion() string { func systemGetWINEVersion() string {
@ -19,13 +19,11 @@ func systemGetWINEVersion() string {
return "" return ""
} }
r1, r2, r3 := wineGetVersionFunc.Call() ret, _, _ := wineGetVersionFunc.Call()
retCStr := (*C.char)(unsafe.Pointer(ret))
wineVersion := C.GoString(retCStr)
log.Println("r1", r1) return wineVersion
log.Println("r2", r2)
log.Println("r3", r3)
return ""
} }
func systemIsUserRoot() bool { func systemIsUserRoot() bool {