mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[VCDCLI] Add support for UDF/Joliet hidding.
By providing /u or /j switch on mount, the virtual CD-ROM class driver will break the associated signatures on read so that FSDs cannot recognize them any longer.
This commit is contained in:
parent
ceb1e0b9ff
commit
4296826c58
|
@ -37,9 +37,11 @@ PrintUsage(int type)
|
||||||
else if (type == 1)
|
else if (type == 1)
|
||||||
{
|
{
|
||||||
_ftprintf(stdout, _T("mount usage:\n"));
|
_ftprintf(stdout, _T("mount usage:\n"));
|
||||||
_ftprintf(stdout, _T("\tmount <drive letter> <path.iso>\n"));
|
_ftprintf(stdout, _T("\tmount <drive letter> <path.iso> [/u] [/j]\n"));
|
||||||
_ftprintf(stdout, _T("\tMount the ISO image given in <path.iso> on the previously created virtual drive <drive letter>\n"));
|
_ftprintf(stdout, _T("\tMount the ISO image given in <path.iso> on the previously created virtual drive <drive letter>\n"));
|
||||||
_ftprintf(stdout, _T("\t\tDo not use colon for drive letter\n"));
|
_ftprintf(stdout, _T("\t\tDo not use colon for drive letter\n"));
|
||||||
|
_ftprintf(stdout, _T("\t\tUse /u to make UDF volumes not appear as such\n"));
|
||||||
|
_ftprintf(stdout, _T("\t\tUse /j to make Joliet volumes not appear as such\n"));
|
||||||
}
|
}
|
||||||
else if (type == 2)
|
else if (type == 2)
|
||||||
{
|
{
|
||||||
|
@ -331,6 +333,7 @@ _tmain(int argc, const TCHAR *argv[])
|
||||||
}
|
}
|
||||||
else if (_tcscmp(argv[1], _T("mount")) == 0)
|
else if (_tcscmp(argv[1], _T("mount")) == 0)
|
||||||
{
|
{
|
||||||
|
DWORD i;
|
||||||
HANDLE hFile;
|
HANDLE hFile;
|
||||||
WCHAR Letter;
|
WCHAR Letter;
|
||||||
UNICODE_STRING NtPathName;
|
UNICODE_STRING NtPathName;
|
||||||
|
@ -377,7 +380,22 @@ _tmain(int argc, const TCHAR *argv[])
|
||||||
/* Copy it in the parameter structure */
|
/* Copy it in the parameter structure */
|
||||||
_tcsncpy(MountParams.Path, NtPathName.Buffer, 255);
|
_tcsncpy(MountParams.Path, NtPathName.Buffer, 255);
|
||||||
MountParams.Length = Min(NtPathName.Length, 255 * sizeof(WCHAR));
|
MountParams.Length = Min(NtPathName.Length, 255 * sizeof(WCHAR));
|
||||||
MountParams.Flags = 0; /* FIXME */
|
MountParams.Flags = 0;
|
||||||
|
|
||||||
|
/* Do we have to suppress anything? */
|
||||||
|
for (i = 4; i < argc; ++i)
|
||||||
|
{
|
||||||
|
/* Make UDF uneffective */
|
||||||
|
if (_tcscmp(argv[i], _T("/u")) == 0)
|
||||||
|
{
|
||||||
|
MountParams.Flags |= MOUNT_FLAG_SUPP_UDF;
|
||||||
|
}
|
||||||
|
/* Make Joliet uneffective */
|
||||||
|
else if (_tcscmp(argv[i], _T("/j")) == 0)
|
||||||
|
{
|
||||||
|
MountParams.Flags |= MOUNT_FLAG_SUPP_JOLIET;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* No longer needed */
|
/* No longer needed */
|
||||||
RtlFreeHeap(RtlGetProcessHeap(), 0, NtPathName.Buffer);
|
RtlFreeHeap(RtlGetProcessHeap(), 0, NtPathName.Buffer);
|
||||||
|
|
Loading…
Reference in a new issue