Logo Search packages:      
Sourcecode: fuse version File versions  Download package

int fuse_parse_cmdline ( struct fuse_args args,
char **  mountpoint,
int *  multithreaded,
int *  foreground 

Parse common options

The following options are parsed:

'-f' foreground '-d' '-odebug' foreground, but keep the debug option '-s' single threaded '-h' '--help' help '-ho' help without header '-ofsname=..' file system name, if not present, then set to the program name

All parameters may be NULL

argsargument vector
mountpointthe returned mountpoint, should be freed after use
multithreadedset to 1 unless the '-s' option is present
foregroundset to 1 if one of the relevant options is present
0 on success, -1 on failure

Definition at line 147 of file helper.c.

References fuse_args::argv, fuse_opt_parse(), and fuse_parse_cmdline().

Referenced by fuse_parse_cmdline().

      int res;
      struct helper_opts hopts;

      memset(&hopts, 0, sizeof(hopts));
      res = fuse_opt_parse(args, &hopts, fuse_helper_opts,
      if (res == -1)
            return -1;

      if (!hopts.nodefault_subtype) {
            res = add_default_subtype(args->argv[0], args);
            if (res == -1)
                  goto err;
      if (mountpoint)
            *mountpoint = hopts.mountpoint;

      if (multithreaded)
            *multithreaded = !hopts.singlethread;
      if (foreground)
            *foreground = hopts.foreground;
      return 0;

      return -1;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index