- make sure that the args array is NULL terminated.
- make sure argc is initialized and argv is set to NULL after freeing.
- make the deep copy function an opt interface function.
up.
- Use malloc and free instead of macros, delete macros.
- Merge the two copies of deep copy and free args that were slightly buggy
into one and use that one.
XXX: Lots of ints should be size_t.
XXX: Bailing on error is not a good thing for a library.
XXX: Defs.h should be eliminated completely. Not all files need all the headers.
+ put some meat into the add_arg and insert_arg functions
+ implement the free_args function
+ use 0 and 1 return values, instead of EXIT_SUCCESS and EXIT_FAILURE, in
internal functions (they bear no relation to shell exit values)
+ deep copy argument structures in refuse.c - we need to do this because
some FUSE file systems attempt to obliterate^Wcloak the argument vector
"for security reasons"
+ a side benefit of this is that we get the specific refuse file system
name back again:
[10:48:43] agc@inspiron1300 ...src/lib/librefuse 38 > df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/dk0 28101396 19318530 7377798 72% /
kernfs 1 1 0 100% /kern
procfs 4 4 0 100% /proc
ptyfs 1 1 0 100% /dev/pts
puffs:refuse:id3fs 0 0 0 100% /mnt
[10:48:51] agc@inspiron1300 ...src/lib/librefuse 39 >
shell in the fuse_opt functions
+ add new debugging functions:
+ __fuse_debug(), which is used to set and retrieve the
debugging level, so that debugging information can be turned
on and off from the user-level filesystem, and
+ __fuse_pargs(), which prints out an argv vector
+ put the comment about pu_privdata back with the code it references
+ put the code to place the refuse name back into the fuse_new()
function - we have access to all the arguments there.
+ specifically include <fuse_opt.h> in <fuse.h> - this would seem to
be what FUSE itself does, judging by the number of fuse-based
filesystems I've patched to include <fuse_opt.h> specifically
+ do away with the forward reference to struct fuse_args in fuse.h,
since it is defined just after the forward reference without being
referenced in between
+ fill in the missing refuse_opt args functionality - add an arg to the
args structure in fuse_opt_add_arg() and fuse_opt_insert_arg(), and
free allocated memory in fuse_opt_free_args().
+ get rid of spurious forward declarations and prototypes.
+ if REFUSE_INHERIT_FS_CHARACTERISTICS is defined when refuse is built,
file systems inherit the vfs characteristics of their mountpoints. The
default value is NOT to inherit the vfs characteristics.
+ perform a deep copy of the fuse_args structure in fuse_mount() -
this is so that existing FUSE filesystems still DTRT when arguments
are zeroed out.
* Move fuse_opt* funcs from refuse.c into refuse_opt.c.
Implement fuse_opt_parse() and fuse_opt_match(). And make the other
functions just dummy, always returning 0 (I added debugging printfs
to see what the application is trying to do).
For now there are two things that do not work in fuse_opt:
* options accepting arguments, i.e -otimeout=%u or -ofile=%s.
* options without arguments are not enabled, just parsed.
At least now curlftpfs works, even with verbose mode! :-)
Ok'ed by pooka.