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

properly checking version in client apps #175

Closed
jbenet opened this issue Nov 3, 2014 · 2 comments
Closed

properly checking version in client apps #175

jbenet opened this issue Nov 3, 2014 · 2 comments

Comments

@jbenet
Copy link

jbenet commented Nov 3, 2014

We're writing https://github.com/jbenet/go-ipfs/ -- a mountable filesystem -- and using osxfuse underneath the hood. we noticed that earlier versions caused kernel panics in some cases (as discussed + fixed in your update logs), so we want to make sure all our users are on 2.7.0+.

We thought about simply comparing the version in sysctl osxfuse.version.number, but we got a user for whom sysctl osxfuse.version.number (and sysctl osxfuse for that matter) returned

> sysctl osxfuse.version.number
top level name osxfuse in osxfuse is invalid

The user runs OS X Mountain Lion, has osxfuse 2.7.2 installed (pref pane shows up. see discussion here: https://botbot.me/freenode/ipfs/2014-11-03/?msg=24718568&page=1)

So, my questions are:

  1. is osxfuse not setting its sysctl options normal?
  2. what is the correct way to check the installed osxfuse version? is there a better way?

Thanks!

@bfleischer
Copy link
Member

  1. is osxfuse not setting its sysctl options normal?

The sysctls are only available after the osxfuse kernel extension has been loaded. Trying to access the version number without osxfuse being loaded will result in the following error message.

$ sysctl osxfuse.version.number
top level name osxfuse in osxfuse.version.number is invalid
  1. what is the correct way to check the installed osxfuse version? is there a better way?

You can use function osxfuse_version() declared in /usr/local/include/osxfuse/fuse/fuse_darwin.h for this purpose. It returns the version string, e.g. 2.7.2. The kernel extension does not have to be loaded for this.

@jbenet
Copy link
Author

jbenet commented Nov 11, 2014

Thanks for the response @bfleischer

For posterity, I made https://github.com/jbenet/go-fuse-version to get at the osxfuse_version in Go.

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

No branches or pull requests

2 participants