summaryrefslogtreecommitdiff
path: root/watchForNewDrives.go
diff options
context:
space:
mode:
Diffstat (limited to 'watchForNewDrives.go')
-rw-r--r--watchForNewDrives.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/watchForNewDrives.go b/watchForNewDrives.go
index 78b2954..3f50707 100644
--- a/watchForNewDrives.go
+++ b/watchForNewDrives.go
@@ -1,8 +1,9 @@
package main
import (
- "log"
"syscall"
+
+ "go.wit.com/log"
)
/*
@@ -43,7 +44,9 @@ func listenForBlockEvents() {
msg := parseUevent(buf[:n])
if msg["SUBSYSTEM"] == "block" && msg["ACTION"] == "add" {
log.Printf("New block device added: %s\n", msg["DEVNAME"])
+ me.dd.AddText("/dev/" + msg["DEVNAME"] + " new")
}
+ log.Printf("New syscall.NETLINK_KOBJECT_UEVENT: %v\n", msg)
}
}