Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenBSD support #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add OpenBSD support #104

wants to merge 2 commits into from

Conversation

fd0
Copy link

@fd0 fd0 commented Jul 18, 2015

This commit contains the following changes:

  • Rename *_freebsd.go -> *_bsd.go
  • Add build tag to *_bsd.go to build for FreeBSD and OpenBSD
  • Replace syscall.EPROTO with syscall.EIO, as the latter is the more portable error code. This change was inspired by sshfs, which introduced it in 2005 (release 1.4).

This commit contains the following changes:
 * Rename *_freebsd.go -> *_bsd.go
 * Add build tag to *_bsd.go to build for FreeBSD and OpenBSD
 * Replace syscall.EPROTO with syscall.EIO, as the latter is the more
   portable error code. This change was inspired by sshfs, which
   introduced it in 2005 (release 1.4).
@fd0
Copy link
Author

fd0 commented Jul 18, 2015

This doesn't work yet, the fuse device on OpenBSD is /dev/fuse0 instead of /dev/fuse, and mount_fusefs doesn't exist. I'll investigate and push more commits.

@tv42
Copy link
Member

tv42 commented Jul 18, 2015

Thanks for all the effort.

@fd0
Copy link
Author

fd0 commented Jul 18, 2015

This somehow doesn't work, the mount syscall fails with a strange error, and I cannot find out what's wrong. I've pushed my last state so that someone doesn't have to start from the beginning again.

@ramrunner
Copy link

ramrunner commented Feb 24, 2017

Hey. thanks for trying to make this to work. i actually have managed to not get an error from the mount syscall using most of your code. The problem i have is that right after mount we are in initmount() which issues a ReadRequest on the fd. The read syscall on that returns 0. @tv42 i'm not familiar with fuse internals but how is this supposed to work? what request can i read from the fuse device initially without it being aware of anything? looking at what libfuse on openbsd does the codepath is quite similar but they just set a kqueue there after mount to be notified for read events from the device. any input that would help us proceed? thanks!
(ps. @fd0 where you getting "device not configured"? if yes it might be because you already have called mount on that dir. on a new dir i don't get a mount error)

@tv42
Copy link
Member

tv42 commented Feb 24, 2017

@ramrunner The first messages exchanged over /dev/fuse are InitRequest and InitResponse. At least they are everywhere else except OpenBSD!

qbit added a commit to qbit/fuse that referenced this pull request May 27, 2017
- go test runs and successfuly mounts a dir, but, doing an ls
in said dir will result in 'device not configured'.
- more info here: bazil#104
@qbit
Copy link

qbit commented May 27, 2017

For anyone that starts working on this again, I have an updated branch (basically the diff from this PR updated to work with 371fbbd: https://github.com/qbit/fuse

go build works fine. go test results in a device not configured directory mounted in /tmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants