Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More polish

  • Loading branch information...
commit 10979ac6d53dfda2e6e9e6b9d5577c5f18ded450 1 parent f193501
Han-Wen Nienhuys authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 main.go
11 main.go
View
@@ -2,13 +2,10 @@ package main
import (
"flag"
"log"
- "runtime"
"github.com/hanwen/go-fuse/fuse"
)
func main() {
- runtime.LockOSThread()
-
fsdebug := flag.Bool("fs-debug", false, "switch on FS debugging")
mtpDebug := flag.Int("mtp-debug", 0, "switch on MTP debugging")
flag.Parse()
@@ -27,9 +24,13 @@ func main() {
for _, d := range devs {
log.Printf("device %v: ", d)
}
- if len(devs) != 1 {
+ if len(devs) == 0 {
+ log.Fatal("no device found. Try replugging it.")
+ }
+ if len(devs) > 1 {
log.Fatal("must have exactly one device")
}
+
rdev := devs[0]
dev, err := rdev.Open()
@@ -59,7 +60,7 @@ func main() {
conn.Debug = *fsdebug
mount.Debug = *fsdebug
- log.Println("starting FUSE loop")
+ log.Println("starting FUSE.")
mount.Loop()
}
Please sign in to comment.
Something went wrong with that request. Please try again.