memfs: memfs-main.c

This commit is contained in:
Bill Zissimopoulos 2016-04-08 16:59:24 -07:00
parent 13b1e448e8
commit 32007577a0

View File

@ -68,11 +68,15 @@ int wmain(int argc, wchar_t **argv)
Result = MemfsStart(Memfs); Result = MemfsStart(Memfs);
if (!NT_SUCCESS(Result)) if (!NT_SUCCESS(Result))
fail("error: cannot start MEMFS"); fail("error: cannot start MEMFS");
Result = FspFileSystemSetMountPoint(MemfsFileSystem(Memfs), MountPoint);
if (!NT_SUCCESS(Result))
fail("error: cannot mount MEMFS");
SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE); SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE);
if (WAIT_OBJECT_0 != WaitForSingleObject(MainEvent, INFINITE)) if (WAIT_OBJECT_0 != WaitForSingleObject(MainEvent, INFINITE))
fail("error: cannot wait on MainEvent"); fail("error: cannot wait on MainEvent");
FspFileSystemRemoveMountPoint(MemfsFileSystem(Memfs));
MemfsStop(Memfs); MemfsStop(Memfs);
MemfsDelete(Memfs); MemfsDelete(Memfs);