summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-06 09:49:42 +0200
committerPaul Buetow <paul@buetow.org>2024-02-06 09:49:42 +0200
commit3ec8b2a55ea7929d15c1578d689376795cdf1ab8 (patch)
tree1100e22af8089b2966a3037bb238bd5e1fb530f1 /main.go
parente00a517c932f1f58fad1f34cf6d32b734c782028 (diff)
cann recv a string from the kernel to userland
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/main.go b/main.go
index 23301b0..77fe40d 100644
--- a/main.go
+++ b/main.go
@@ -8,7 +8,6 @@ import (
"time"
"unsafe"
- "encoding/binary"
"fmt"
"syscall"
@@ -104,16 +103,7 @@ func main() {
}()
ev := <-eventsChannel
- if binary.LittleEndian.Uint32(ev) != 50 {
- fmt.Fprintf(os.Stderr, "invalid data retrieved\n")
- os.Exit(-1)
- }
-
- ev = <-eventsChannel
- if ev[0] != value2[0] || ev[1] != value2[1] || ev[2] != value2[2] {
- fmt.Fprintf(os.Stderr, "invalid data retrieved\n")
- os.Exit(-1)
- }
+ fmt.Println("Received ", string(ev))
pb.Stop()
pb.Close()