mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
dll: fuse: help system refactoring
This commit is contained in:
parent
3f3c02f3ce
commit
3620de44d1
@ -45,6 +45,18 @@ static struct fuse_opt fsp_fuse_main_opts[] =
|
|||||||
static int fsp_fuse_main_opt_proc(void *opt_data0, const char *arg, int key,
|
static int fsp_fuse_main_opt_proc(void *opt_data0, const char *arg, int key,
|
||||||
struct fuse_args *outargs)
|
struct fuse_args *outargs)
|
||||||
{
|
{
|
||||||
|
static PWSTR HeaderHelp = L""
|
||||||
|
"\n"
|
||||||
|
" -o opt,[opt...] mount options\n"
|
||||||
|
" -h --help print help\n"
|
||||||
|
" -V --version print version\n"
|
||||||
|
"\n";
|
||||||
|
static PWSTR MainHelp = L""
|
||||||
|
"FUSE options:\n"
|
||||||
|
" -d -o debug enable debug output (implies -f)\n"
|
||||||
|
" -f foreground operation\n"
|
||||||
|
" -s disable multi-threaded operation\n"
|
||||||
|
"\n";
|
||||||
struct fsp_fuse_main_opt_data *opt_data = opt_data0;
|
struct fsp_fuse_main_opt_data *opt_data = opt_data0;
|
||||||
|
|
||||||
switch (key)
|
switch (key)
|
||||||
@ -54,25 +66,14 @@ static int fsp_fuse_main_opt_proc(void *opt_data0, const char *arg, int key,
|
|||||||
case 'h':
|
case 'h':
|
||||||
FspServiceLog(EVENTLOG_ERROR_TYPE, L""
|
FspServiceLog(EVENTLOG_ERROR_TYPE, L""
|
||||||
"usage: %s mountpoint [options]\n"
|
"usage: %s mountpoint [options]\n"
|
||||||
"\n"
|
"%s"
|
||||||
" -o opt,[opt...] mount options\n"
|
"%s",
|
||||||
" -h --help print help\n"
|
FspDiagIdent(), HeaderHelp, MainHelp);
|
||||||
" -V --version print version\n"
|
|
||||||
"\n"
|
|
||||||
"FUSE options:\n"
|
|
||||||
" -d -o debug enable debug output (implies -f)\n"
|
|
||||||
" -f foreground operation\n"
|
|
||||||
" -s disable multi-threaded operation\n"
|
|
||||||
"\n",
|
|
||||||
FspDiagIdent());
|
|
||||||
return 1;
|
return 1;
|
||||||
case 'H':
|
case 'H':
|
||||||
FspServiceLog(EVENTLOG_ERROR_TYPE, L""
|
FspServiceLog(EVENTLOG_ERROR_TYPE, L""
|
||||||
"FUSE options:\n"
|
"%s",
|
||||||
" -d -o debug enable debug output (implies -f)\n"
|
MainHelp);
|
||||||
" -f foreground operation\n"
|
|
||||||
" -s disable multi-threaded operation\n"
|
|
||||||
"\n");
|
|
||||||
fsp_fuse_opt_add_arg(opt_data->env, outargs, "-h");
|
fsp_fuse_opt_add_arg(opt_data->env, outargs, "-h");
|
||||||
return 0;
|
return 0;
|
||||||
case FUSE_OPT_KEY_NONOPT:
|
case FUSE_OPT_KEY_NONOPT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user