Suggest Linux kernel upgrade if FUSE is not available.
[captive.git] / src / client / fuse / main.c
index 5b942e6..06ad27a 100644 (file)
@@ -106,7 +106,7 @@ struct fuse *capfuse_fuse;
                        &capfuse_mountpoint,    /* mountpoint */
                        &capfuse_multithreaded, /* multithreaded */
                        &capfuse_fd)))  /* fd */
-               g_error(_("FUSE fuse_setup() failed"));
+               g_error(_("FUSE fuse_setup() failed - you may need Linux kernel 2.6.14 or higher with its 'fuse.ko' enabled"));
        if (fuse_loop(capfuse_fuse)) {
                /* Do not: g_error(_("FUSE fuse_loop() error"));
                 * as it is caused on each umount(8).
@@ -151,6 +151,10 @@ char **sp;
 
        captive_standalone_init();
 
+       /* poptGetNextOpt() below requires valid: captive_options */
+       captive_options_init(&options);
+       captive_options=&options;       /* for parsing by 'CAPTIVE_POPT_INCLUDE' */
+
        argv_sp=argv+1;
        if (*argv_sp && (*argv_sp)[0]!='-')
                image_filename=*argv_sp++;
@@ -172,6 +176,7 @@ char **sp;
                /* Lethal path but still give chance for "--help" etc. */
                /* Do not: POPT_CONTEXT_POSIXMEHARDER
                 * as mount(8) puts there first un-pre-dashed "ro"/"rw" etc. */
+               /* poptGetNextOpt() requires valid: captive_options */
                if ((context=poptGetContext(
                                PACKAGE,        /* name */
                                argc,(/*en-const*/const char **)argv,   /* argc,argv */
@@ -230,9 +235,6 @@ char *s,quote;
                        }
                }
 
-       captive_options_init(&options);
-       captive_options=&options;       /* for parsing by 'CAPTIVE_POPT_INCLUDE' */
-
        g_assert(!options.sandbox_server_argv);
        g_assert(!options.sandbox_server_ior);
        /* captive_options_free(&options) will: g_free(options.sandbox_server_argv); */