#include <fuse.h>
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+# define XATTR_CREATE 1
+# define XATTR_REPLACE 2
+#else
+# include <sys/xattr.h>
+#endif
+
/* Determine if threads support should be included */
#ifdef USE_ITHREADS
# ifdef I_PTHREAD
OUTPUT:
RETVAL
+SV *
+XATTR_CREATE()
+ CODE:
+ RETVAL = newSViv(XATTR_CREATE);
+ OUTPUT:
+ RETVAL
+
+SV *
+XATTR_REPLACE()
+ CODE:
+ RETVAL = newSViv(XATTR_REPLACE);
+ OUTPUT:
+ RETVAL
+
void
perl_fuse_main(...)
PREINIT:
} else if(SvOK(var)) {
croak("invalid callback (%i) passed to perl_fuse_main "
"(%s is not a string, code ref, or undef).\n",
- i+4,SvPVbyte_nolen(var));
+ i+5,SvPVbyte_nolen(var));
} else {
MY_CXT.callback[i] = NULL;
}
* 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(&args, "") == -1 ||
- fuse_opt_add_arg(&args, "-o") == -1 ||
+ if ((mountopts || debug) && fuse_opt_add_arg(&args, "") == -1) {
+ fuse_opt_free_args(&args);
+ croak("out of memory\n");
+ }
+ if (mountopts && strcmp("", mountopts) &&
+ (fuse_opt_add_arg(&args, "-o") == -1 ||
fuse_opt_add_arg(&args, mountopts) == -1)) {
fuse_opt_free_args(&args);
croak("out of memory\n");