mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
Merge pull request #251 from johntyner/feature/remove-fuse-prefix
Remove "FUSE-" prefix from file system name when using FUSE API
This commit is contained in:
commit
6f585ce63e
@ -61,6 +61,7 @@ CONTRIBUTOR LIST
|
||||
|Francois Karam (KS2, http://www.ks2.fr) |francois.karam at ks2.fr
|
||||
|Fritz Elfert |fritz-github at fritz-elfert.de
|
||||
|John Oberschelp |john at oberschelp.net
|
||||
|John Tyner |jtyner at gmail.com
|
||||
|Sam Kelly (DuroSoft Technologies LLC, https://durosoft.com) |sam at durosoft.com
|
||||
|Santiago Ganis |sganis at gmail.com
|
||||
|Tobias Urlaub |saibotu at outlook.de
|
||||
|
@ -102,6 +102,8 @@ static struct fuse_opt fsp_fuse_core_opts[] =
|
||||
FUSE_OPT_KEY("--VolumePrefix=", 'U'),
|
||||
FUSE_OPT_KEY("FileSystemName=", 'F'),
|
||||
FUSE_OPT_KEY("--FileSystemName=", 'F'),
|
||||
FUSE_OPT_KEY("ExactFileSystemName=", 'E'),
|
||||
FUSE_OPT_KEY("--ExactFileSystemName=", 'E'),
|
||||
|
||||
FSP_FUSE_CORE_OPT("UserName=", set_uid, 1),
|
||||
FUSE_OPT_KEY("UserName=", 'u'),
|
||||
@ -367,6 +369,18 @@ static int fsp_fuse_core_opt_proc(void *opt_data0, const char *arg, int key,
|
||||
[sizeof opt_data->VolumeParams.FileSystemName / sizeof(WCHAR) - 1] = L'\0';
|
||||
memcpy(opt_data->VolumeParams.FileSystemName, L"FUSE-", 5 * sizeof(WCHAR));
|
||||
return 0;
|
||||
case 'E':
|
||||
if ('E' == arg[0])
|
||||
arg += sizeof "ExactFileSystemName=" - 1;
|
||||
else if ('E' == arg[2])
|
||||
arg += sizeof "--ExactFileSystemName=" - 1;
|
||||
if (0 == MultiByteToWideChar(CP_UTF8, 0, arg, -1,
|
||||
opt_data->VolumeParams.FileSystemName,
|
||||
sizeof opt_data->VolumeParams.FileSystemName / sizeof(WCHAR)))
|
||||
return -1;
|
||||
opt_data->VolumeParams.FileSystemName
|
||||
[sizeof opt_data->VolumeParams.FileSystemName / sizeof(WCHAR) - 1] = L'\0';
|
||||
return 0;
|
||||
case 'u':
|
||||
if ('U' == arg[0])
|
||||
arg += sizeof "UserName=" - 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user