int _PLfuse_setxattr (const char *file, const char *name, const char *buf, size_t buflen, int flags) {
int _PLfuse_setxattr (const char *file, const char *name, const char *buf, size_t buflen, int flags) {
int _PLfuse_getxattr (const char *file, const char *name, char *buf, size_t buflen) {
int _PLfuse_getxattr (const char *file, const char *name, char *buf, size_t buflen) {
(void) hv_store(fihash, "direct_io", 9, newSViv(fi->direct_io), 0);
(void) hv_store(fihash, "keep_cache", 10, newSViv(fi->keep_cache), 0);
(void) hv_store(fihash, "direct_io", 9, newSViv(fi->direct_io), 0);
(void) hv_store(fihash, "keep_cache", 10, newSViv(fi->keep_cache), 0);
#if FUSE_VERSION >= 29
(void) hv_store(fihash, "nonseekable", 11, newSViv(fi->nonseekable), 0);
#endif
#if FUSE_VERSION >= 29
(void) hv_store(fihash, "nonseekable", 11, newSViv(fi->nonseekable), 0);
#endif
SV **svp;
if ((svp = hv_fetch(fihash, "direct_io", 9, 0)) != NULL)
fi->direct_io = SvIV(*svp);
if ((svp = hv_fetch(fihash, "keep_cache", 10, 0)) != NULL)
fi->keep_cache = SvIV(*svp);
SV **svp;
if ((svp = hv_fetch(fihash, "direct_io", 9, 0)) != NULL)
fi->direct_io = SvIV(*svp);
if ((svp = hv_fetch(fihash, "keep_cache", 10, 0)) != NULL)
fi->keep_cache = SvIV(*svp);
#if FUSE_VERSION >= 29
if ((svp = hv_fetch(fihash, "nonseekable", 11, 0)) != NULL)
fi->nonseekable = SvIV(*svp);
#if FUSE_VERSION >= 29
if ((svp = hv_fetch(fihash, "nonseekable", 11, 0)) != NULL)
fi->nonseekable = SvIV(*svp);
} else if(SvOK(var)) {
croak("invalid callback (%i) passed to perl_fuse_main "
"(%s is not a string, code ref, or undef).\n",
} else if(SvOK(var)) {
croak("invalid callback (%i) passed to perl_fuse_main "
"(%s is not a string, code ref, or undef).\n",
* to hack on compatibility with other parts of the new API. First and
* foremost, real C argc/argv would be good to get at...
*/
* 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");
fuse_opt_add_arg(&args, mountopts) == -1)) {
fuse_opt_free_args(&args);
croak("out of memory\n");