#include <captive/client-vfs.h>
#include <captive/macros.h>
+#include <captive/client.h>
+#include <captive/captivemodid.h>
#include "main.h" /* self */
#include "op_statfs.h"
|G_LOG_LEVEL_DEBUG
));
- /* Prevent output block buffering if redirecting stdout to file. */
- setvbuf(stdout,(char *)NULL,_IONBF,0);
- setvbuf(stderr,(char *)NULL,_IONBF,0);
-
- /* Initialize the i18n stuff */
- setlocale(LC_ALL,"");
- bindtextdomain(PACKAGE,LOCALEDIR);
- textdomain(PACKAGE);
-
- /* Initialize GObject subsystem of GLib. */
- g_type_init();
+ captive_standalone_init();
captive_options_init(&options);
captive_options=&options; /* for parsing by 'CAPTIVE_POPT_INCLUDE' */
for (csp=rest_argv,rest_argc=0;csp && *csp;csp++)
rest_argc++;
- captive_options=NULL; /* already parsed by 'CAPTIVE_POPT_INCLUDE' */
-
/* Override the (default) Captive options with mount(8) supplied "-o" argument. */
/* rest_argv[0] is the device now. */
/* rest_argv[1] is the mountpoint now. */
g_error(_("image_iochannel failed open of: %s"),image_filename);
return EXIT_FAILURE;
}
+
+ if (!options.captivemodid)
+ options.captivemodid=captive_captivemodid_load_default(FALSE);
if (options.filesystem.type==CAPTIVE_OPTIONS_MODULE_TYPE_EMPTY) {
const char *self_prefix="mount.captive-";
options.load_module=g_list_append(options.load_module,options_module);
}
+ /* It is still required for: captive_options_module_load() */
+ captive_options=NULL; /* already parsed by 'CAPTIVE_POPT_INCLUDE' */
+
if (GNOME_VFS_OK!=captive_vfs_new(&capfuse_captive_vfs_object,&options)) {
g_error(_("captive_vfs_new() failed"));
return EXIT_FAILURE;