From 6be55aa5154b6e5d2c7bab22036d933212c0c285 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 23 May 2016 17:16:06 -0700 Subject: [PATCH] memfs: allow empty VolumePrefix in command line --- tst/memfs/memfs-main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tst/memfs/memfs-main.c b/tst/memfs/memfs-main.c index 65d90187..abbdf7ec 100644 --- a/tst/memfs/memfs-main.c +++ b/tst/memfs/memfs-main.c @@ -76,7 +76,8 @@ NTSTATUS SvcStart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv) break; case L'u': argtos(VolumePrefix); - Flags = MemfsNet; + if (0 != VolumePrefix && L'\0' != VolumePrefix[0]) + Flags = MemfsNet; break; default: goto usage; @@ -122,7 +123,8 @@ NTSTATUS SvcStart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv) info(L"%s -t %ld -n %ld -s %ld%s%s%s%s%s%s", L"" PROGNAME, FileInfoTimeout, MaxFileNodes, MaxFileSize, RootSddl ? L" -S " : L"", RootSddl ? RootSddl : L"", - VolumePrefix ? L" -u " : L"", VolumePrefix ? VolumePrefix : L"", + 0 != VolumePrefix && L'\0' != VolumePrefix[0] ? L" -u " : L"", + 0 != VolumePrefix && L'\0' != VolumePrefix[0] ? VolumePrefix : L"", MountPoint ? L" -m " : L"", MountPoint ? MountPoint : L""); Service->UserContext = Memfs;