Compare commits
No commits in common. "f87f5db493b56c5f4ebe482a1b7d02c7e5d572fa" and "279744a252a0867c1145e1890214a346cc296da5" have entirely different histories.
f87f5db493
...
279744a252
10
Changelog.md
10
Changelog.md
|
@ -3,15 +3,7 @@
|
|||
|
||||
**v1.6.0**
|
||||
|
||||
- Rename import path to `github.com/winfsp/cgofuse`.
|
||||
|
||||
- Convert package to module.
|
||||
|
||||
- Preliminary support for Windows on ARM64.
|
||||
|
||||
- Add `FileSystemGetpath` interface. A case-insensitive file system can use `Getpath` to report the correct case of a file path on Windows.
|
||||
|
||||
- Add `FileSystemHost.SetCapDeleteAccess`. A file system can use this capability to deny delete access on Windows. Such a file system must:
|
||||
- Add `FileSystemHost.SetCapDeleteAccess` [Windows only]. A file system can use this capability to deny delete access on Windows. Such a file system must:
|
||||
- Implement the `Access` file system operation and handle the new `fuse.DELETE_OK` mask to return `-fuse.EPERM` for files that should not be deleted. An example implementation might look like:
|
||||
```Go
|
||||
func (fs *filesystem) Access(path string, mask uint32) int {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//go:build cgo
|
||||
// +build cgo
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//go:build !cgo && windows
|
||||
// +build !cgo,windows
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//go:build cgo
|
||||
// +build cgo
|
||||
|
||||
/*
|
||||
|
@ -16,7 +15,7 @@
|
|||
package fuse
|
||||
|
||||
/*
|
||||
#cgo darwin CFLAGS: -DFUSE_USE_VERSION=28 -D_FILE_OFFSET_BITS=64 -I/usr/local/include/osxfuse/fuse -I/usr/local/include/fuse
|
||||
#cgo darwin CFLAGS: -DFUSE_USE_VERSION=28 -D_FILE_OFFSET_BITS=64 -I/usr/local/include/osxfuse/fuse
|
||||
#cgo freebsd CFLAGS: -DFUSE_USE_VERSION=28 -D_FILE_OFFSET_BITS=64 -I/usr/local/include/fuse
|
||||
#cgo netbsd CFLAGS: -DFUSE_USE_VERSION=28 -D_FILE_OFFSET_BITS=64 -D_KERNTYPES
|
||||
#cgo openbsd CFLAGS: -DFUSE_USE_VERSION=28 -D_FILE_OFFSET_BITS=64
|
||||
|
@ -172,8 +171,6 @@ static void *cgofuse_init_fuse(void)
|
|||
h = dlopen("/usr/local/lib/libfuse.2.dylib", RTLD_NOW); // MacFUSE/OSXFuse >= v4
|
||||
if (0 == h)
|
||||
h = dlopen("/usr/local/lib/libosxfuse.2.dylib", RTLD_NOW); // MacFUSE/OSXFuse < v4
|
||||
if (0 == h)
|
||||
h = dlopen("/usr/local/lib/libfuse-t.dylib", RTLD_NOW); // FUSE-T
|
||||
#elif defined(__FreeBSD__)
|
||||
h = dlopen("libfuse.so.2", RTLD_NOW);
|
||||
#elif defined(__NetBSD__)
|
||||
|
@ -218,9 +215,7 @@ static int (* pfn_fsp_fuse_notify)(struct fsp_fuse_env *env,
|
|||
|
||||
static NTSTATUS FspLoad(void **PModule)
|
||||
{
|
||||
#if defined(__aarch64__)
|
||||
#define FSP_DLLNAME "winfsp-a64.dll"
|
||||
#elif defined(__amd64__)
|
||||
#if defined(_WIN64)
|
||||
#define FSP_DLLNAME "winfsp-x64.dll"
|
||||
#else
|
||||
#define FSP_DLLNAME "winfsp-x86.dll"
|
||||
|
@ -634,21 +629,9 @@ static int hostUnmount(struct fuse *fuse, char *mountpoint)
|
|||
if (0 == umount2(mountpoint, MNT_DETACH))
|
||||
return 1;
|
||||
// linux: umount2 failed; try fusermount
|
||||
char *paths[] =
|
||||
{
|
||||
"/bin/fusermount",
|
||||
"/usr/bin/fusermount",
|
||||
};
|
||||
char *path = paths[0];
|
||||
for (size_t i = 0; sizeof paths / sizeof paths[0] > i; i++)
|
||||
if (0 == access(paths[i], X_OK))
|
||||
{
|
||||
path = paths[i];
|
||||
break;
|
||||
}
|
||||
char *argv[] =
|
||||
{
|
||||
path,
|
||||
"/bin/fusermount",
|
||||
"-z",
|
||||
"-u",
|
||||
mountpoint,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//go:build !cgo && windows
|
||||
// +build !cgo,windows
|
||||
|
||||
/*
|
||||
|
@ -17,7 +16,6 @@ package fuse
|
|||
|
||||
import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
@ -541,12 +539,9 @@ func c_hostOptParse(args *c_struct_fuse_args, data unsafe.Pointer, opts *c_struc
|
|||
|
||||
func fspload() (dll *syscall.DLL, err error) {
|
||||
dllname := ""
|
||||
switch runtime.GOARCH {
|
||||
case "arm64":
|
||||
dllname = "winfsp-a64.dll"
|
||||
case "amd64":
|
||||
if uint64(0xffffffff) < uint64(^uintptr(0)) {
|
||||
dllname = "winfsp-x64.dll"
|
||||
case "386":
|
||||
} else {
|
||||
dllname = "winfsp-x86.dll"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//go:build darwin || freebsd || netbsd || openbsd || linux
|
||||
// +build darwin freebsd netbsd openbsd linux
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue