Browse Source

FUSE: add os specific mount options

related to https://github.com/chrislusf/seaweedfs/issues/1094
pull/1097/head
Chris Lu 5 years ago
parent
commit
eb2172f63f
  1. 10
      weed/command/mount_darwin.go
  2. 10
      weed/command/mount_freebsd.go
  3. 12
      weed/command/mount_linux.go
  4. 1
      weed/command/mount_notsupported.go
  5. 5
      weed/command/mount_std.go

10
weed/command/mount_darwin.go

@ -0,0 +1,10 @@
package command
import (
"github.com/seaweedfs/fuse"
)
func osSpecificMountOptions() []fuse.MountOption {
return []fuse.MountOption{}
}

10
weed/command/mount_freebsd.go

@ -0,0 +1,10 @@
package command
import (
"github.com/seaweedfs/fuse"
)
func osSpecificMountOptions() []fuse.MountOption {
return []fuse.MountOption{}
}

12
weed/command/mount_linux.go

@ -0,0 +1,12 @@
package command
import (
"github.com/seaweedfs/fuse"
)
func osSpecificMountOptions() []fuse.MountOption {
return []fuse.MountOption{
fuse.AllowNonEmptyMount(),
}
}

1
weed/command/mount_notsupported.go

@ -1,5 +1,6 @@
// +build !linux // +build !linux
// +build !darwin // +build !darwin
// +build !freebsd
package command package command

5
weed/command/mount_std.go

@ -1,4 +1,4 @@
// +build linux darwin
// +build linux darwin freebsd
package command package command
@ -107,6 +107,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
fuse.WritebackCache(), fuse.WritebackCache(),
fuse.AllowNonEmptyMount(), fuse.AllowNonEmptyMount(),
} }
options = append(options, osSpecificMountOptions()...)
if allowOthers { if allowOthers {
options = append(options, fuse.AllowOther()) options = append(options, fuse.AllowOther())
} }

Loading…
Cancel
Save