Hello, I've recently started using OpenBSD and tried rclone to mount Google
Drive.
Read-only seems to work, but the problem is with writing.
After a bit of research, I found that on OpenBSD creating a new file uses
func (fsys *FS) Mknod(...)
in the source file
rclone/cmd/cmount/fs.go
which returns -ENOSYS by default.
Below are the original and patched versions.
It seems to work.
I'd like to ask for your opinion.
===================================================
// Mknod original
===================================================
func (fsys *FS) Mknod(path string, mode uint32, dev uint64) (errc int) {
defer log.Trace(path, "mode=0x%X, dev=0x%X", mode, dev)("errc=%d",
&errc)
return -fuse.ENOSYS
}
===================================================
// Mknod patched
===================================================
func (fsys *FS) Mknod(path string, mode uint32, dev uint64) (errc int) {
defer log.Trace(path, "mode=0x%X, dev=0x%X", mode, dev)("errc=%d",
&errc)
fi := fuse.FileInfo_t{
Flags: fuse.O_WRONLY | fuse.O_CREAT | fuse.O_EXCL,
}
errc = fsys.CreateEx(path, mode, &fi)
if errc != 0 {
return errc
}
return fsys.Release(path, fi.Fh)
}
===================================================
After that, the rclone mount options
--vfs-cache-mode write
or
--vfs-cache-mode full
have to be used for writes truncated/not truncated.
Best regards,
Paolo