vendor: update bazil.org/fuse to fix FreeBSD 12.1 - fixes #3697

This commit is contained in:
Nick Craig-Wood
2020-01-05 16:35:30 +00:00
parent 1b89b38a4c
commit 21b17b14a9
77 changed files with 38282 additions and 36267 deletions
+9 -11
View File
@@ -3,6 +3,8 @@
package fs // import "bazil.org/fuse/fs"
import (
"bytes"
"context"
"encoding/binary"
"fmt"
"hash/fnv"
@@ -14,12 +16,6 @@ import (
"sync"
"time"
"golang.org/x/net/context"
)
import (
"bytes"
"bazil.org/fuse"
"bazil.org/fuse/fuseutil"
)
@@ -71,6 +67,9 @@ type FSInodeGenerator interface {
//
// Implementing this is useful to e.g. constrain the range of
// inode values used for dynamic inodes.
//
// Non-zero return values should be greater than 1, as that is
// always used for the root inode.
GenerateInode(parentInode uint64, name string) uint64
}
@@ -435,8 +434,6 @@ func Serve(c *fuse.Conn, fs FS) error {
return server.Serve(fs)
}
type nothing struct{}
type serveRequest struct {
Request fuse.Request
cancel func()
@@ -1557,11 +1554,12 @@ func GenerateDynamicInode(parent uint64, name string) uint64 {
var inode uint64
for {
inode = h.Sum64()
if inode != 0 {
if inode > 1 {
break
}
// there's a tiny probability that result is zero; change the
// input a little and try again
// there's a tiny probability that result is zero or the
// hardcoded root inode 1; change the input a little and try
// again
_, _ = h.Write([]byte{'x'})
}
return inode
+1 -4
View File
@@ -3,14 +3,11 @@
package fs
import (
"context"
"os"
pathpkg "path"
"strings"
"golang.org/x/net/context"
)
import (
"bazil.org/fuse"
)