mount: complete fix for freebsd
fix https://github.com/seaweedfs/seaweedfs/issues/6645
This commit is contained in:
5
weed/command/mount_freebsd.go
Normal file
5
weed/command/mount_freebsd.go
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package command
|
||||||
|
|
||||||
|
func checkMountPointAvailable(dir string) bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
//go:build !linux && !darwin
|
//go:build !linux && !darwin && !freebsd
|
||||||
// +build !linux,!darwin
|
// +build !linux,!darwin,!freebsd
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
//go:build linux || darwin
|
//go:build linux || darwin || freebsd
|
||||||
// +build linux darwin
|
// +build linux darwin freebsd
|
||||||
|
|
||||||
package command
|
package command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util/version"
|
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@@ -17,6 +16,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/seaweedfs/seaweedfs/weed/util/version"
|
||||||
|
|
||||||
"github.com/hanwen/go-fuse/v2/fuse"
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/mount"
|
"github.com/seaweedfs/seaweedfs/weed/mount"
|
||||||
|
|||||||
8
weed/mount/weedfs_attr_freebsd.go
Normal file
8
weed/mount/weedfs_attr_freebsd.go
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package mount
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
)
|
||||||
|
|
||||||
|
func setBlksize(out *fuse.Attr, size uint32) {
|
||||||
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
//go:build !freebsd
|
||||||
|
// +build !freebsd
|
||||||
|
|
||||||
package mount
|
package mount
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
27
weed/mount/weedfs_xattr_freebsd.go
Normal file
27
weed/mount/weedfs_xattr_freebsd.go
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package mount
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"github.com/hanwen/go-fuse/v2/fuse"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (wfs *WFS) GetXAttr(cancel <-chan struct{}, header *fuse.InHeader, attr string, dest []byte) (size uint32, code fuse.Status) {
|
||||||
|
|
||||||
|
return 0, fuse.Status(syscall.ENOTSUP)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (wfs *WFS) SetXAttr(cancel <-chan struct{}, input *fuse.SetXAttrIn, attr string, data []byte) fuse.Status {
|
||||||
|
|
||||||
|
return fuse.Status(syscall.ENOTSUP)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (wfs *WFS) ListXAttr(cancel <-chan struct{}, header *fuse.InHeader, dest []byte) (n uint32, code fuse.Status) {
|
||||||
|
|
||||||
|
return 0, fuse.Status(syscall.ENOTSUP)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (wfs *WFS) RemoveXAttr(cancel <-chan struct{}, header *fuse.InHeader, attr string) fuse.Status {
|
||||||
|
|
||||||
|
return fuse.Status(syscall.ENOTSUP)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user