By the way, where are you calling this function from? Hopefully from
within the user-space file system that's responsible for "path" (and
not from a different program altogether). Is that the case?

Amit

On Feb 13, 8:39 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Is this function known to work?  It seems like a rewrite of the now-
> obsolete fuse.c/fuse_invalidate() and appears to try and flush entries
> from the vnode cache, among other effects, but when I call it with a
> valid path, like "/", I get a segmentation fault.  Here's my code
> (using python bindings):
>
> <code>
> // python function
> def purgeName(path):
>     return FusePurgeName(path)
>
> // C function
> static PyObject *
> FusePurgeName(PyObject *self, PyObject *args)
> {
>         char *path;
>         PyObject *ret;
>         int err;
>
>         PyArg_ParseTuple(args, "s", &path);
>         printf("%s\n", path);
>         err = fuse_purge_path_np(path);
> // segmentation fault before it returns
>         printf("%i\n", err);
>         ret = Py_BuildValue("i", err);
>         return(ret);}
>
> </code>
>
> I'm admittedly rusty with C, so I could be passing the path string
> incorrectly, but the printf looks correct, and PyArg_ParseTuple is
> guaranteed to null-terminate any strings.
>
> If I set path to "" or NULL, the behavior is correct (i.e., it returns
> with an errno).   Any idea why it faults when I pass it a path string?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"macfuse-devel" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/macfuse-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to