Hello,

I found the problem, turns out that when you include fuse/fuse_lowlevel.h,
you're supposed to also define the FUSE_USE_VERSION macro, otherwise
it defaults to 24 and uses the fuse_mount_compat22 function for fuse_mount,
which doesn't match what the code in this package expects.

The code includes fuse_lowlevel.h, which contains the following warning:

   /** @file
    *
    * Low level API
    *
    * IMPORTANT: you should define FUSE_USE_VERSION before including this
    * header.  To use the newest API define it to 26 (recommended for any
    * new application), to use the old API define it to 24 (default) or
    * 25
    */

Here is the code in question:

   #include <fuse/fuse_lowlevel.h>
   #include <stdio.h>
   #include <stdlib.h>
   #include <errno.h>
   #include <unistd.h>

   static int init_fuse(int argc, char **argv)
   {
           struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
           char *mountpoint;

           if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) == -1)
                   return -EINVAL;
           return fuse_mount(mountpoint, &args);
   }

Here are the available fuse_mount() functions:

   struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args 
*args);
   int fuse_mount_compat25(const char *mountpoint, struct fuse_args *args);
   int fuse_mount_compat22(const char *mountpoint, const char *opts);
   int fuse_mount_compat1(const char *mountpoint, const char *args[]);

Looking at the code and the prototypes, the code expects 
fuse_mount_compat25,
so the FUSE_USE_VERSION macro should be set to 25, either by specifying it
in the makefile, or by adding a #define into the umlfs/uml_mount.c file:

--- uml-utilities-20070815.4.orig/umlfs/uml_mount.c
+++ uml-utilities-20070815.4/umlfs/uml_mount.c
@@ -1,3 +1,5 @@
+#define FUSE_USE_VERSION 25
+
  #include <fuse/fuse_lowlevel.h>
  #include <stdio.h>
  #include <stdlib.h>


Best Regards,
Marek

Reply via email to