- /* FIXME: need to pass fusermount arguments */
- fd = fuse_mount(mountpoint,mountopts);
+ /*
+ * XXX: What comes here is just a ridiculous use of the option parsing API
+ * to hack on compatibility with other parts of the new API. First and
+ * foremost, real C argc/argv would be good to get at...
+ */
+ if (mountopts &&
+ (fuse_opt_add_arg(&margs, "") == -1 ||
+ fuse_opt_add_arg(&margs, "-o") == -1 ||
+ fuse_opt_add_arg(&margs, mountopts) == -1)) {
+ fuse_opt_free_args(&margs);
+ croak("out of memory\n");
+ }
+ fd = fuse_mount(mountpoint,&margs);
+ fuse_opt_free_args(&margs);