Author: hbelusca
Date: Thu Jun 8 02:20:33 2017
New Revision: 74953
URL: http://svn.reactos.org/svn/reactos?rev=74953&view=rev
Log:
[SETUPLIB]: Adapt the code in osdetect.c to make it use the new features of bldrsup.c committed in r74952.
Modified:
branches/setup_improvements/base/setup/lib/osdetect.c
Modified: branches/setup_improvements/base/setup/lib/osdetect.c
URL: http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/l…
==============================================================================
--- branches/setup_improvements/base/setup/lib/osdetect.c [iso-8859-1] (original)
+++ branches/setup_improvements/base/setup/lib/osdetect.c [iso-8859-1] Thu Jun 8 02:20:33 2017
@@ -74,6 +74,7 @@
IN PVOID Parameter OPTIONAL)
{
PENUM_INSTALLS_DATA Data = (PENUM_INSTALLS_DATA)Parameter;
+ PNTOS_OPTIONS Options = (PNTOS_OPTIONS)&BootEntry->OsOptions;
PNTOS_INSTALLATION NtOsInstall;
UNICODE_STRING SystemRootPath;
@@ -88,10 +89,11 @@
/* We have a boot entry */
/* Check for supported boot type "Windows2003" */
- // TODO: What to do with "Windows" ; "WindowsNT40" ; "ReactOSSetup" ?
- if ((BootEntry->Version == NULL) ||
- ( (_wcsicmp(BootEntry->Version, L"Windows2003") != 0) &&
- (_wcsicmp(BootEntry->Version, L"\"Windows2003\"") != 0) ))
+ if (BootEntry->OsOptionsLength < sizeof(NTOS_OPTIONS) ||
+ RtlCompareMemory(&BootEntry->OsOptions /* Signature */,
+ NTOS_OPTIONS_SIGNATURE,
+ RTL_FIELD_SIZE(NTOS_OPTIONS, Signature)) !=
+ RTL_FIELD_SIZE(NTOS_OPTIONS, Signature))
{
/* This is not a ReactOS entry */
DPRINT1(" An installation '%S' of unsupported type '%S'\n",
@@ -100,7 +102,8 @@
return STATUS_SUCCESS;
}
- if (!BootEntry->OsLoadPath || !*BootEntry->OsLoadPath)
+ /* BootType is Windows2003, now check OsLoadPath */
+ if (!Options->OsLoadPath || !*Options->OsLoadPath)
{
/* Certainly not a ReactOS installation */
DPRINT1(" A Win2k3 install '%S' without an ARC path?!\n", BootEntry->FriendlyName);
@@ -109,9 +112,9 @@
}
DPRINT1(" Found a candidate Win2k3 install '%S' with ARC path '%S'\n",
- BootEntry->FriendlyName, BootEntry->OsLoadPath);
+ BootEntry->FriendlyName, Options->OsLoadPath);
// DPRINT1(" Found a Win2k3 install '%S' with ARC path '%S'\n",
- // BootEntry->FriendlyName, BootEntry->OsLoadPath);
+ // BootEntry->FriendlyName, Options->OsLoadPath);
// TODO: Normalize the ARC path.
@@ -119,7 +122,7 @@
* Check whether we already have an installation with this ARC path.
* If this is the case, stop there.
*/
- NtOsInstall = FindExistingNTOSInstall(Data->List, BootEntry->OsLoadPath, NULL);
+ NtOsInstall = FindExistingNTOSInstall(Data->List, Options->OsLoadPath, NULL);
if (NtOsInstall)
{
DPRINT1(" An NTOS installation with name \"%S\" already exists in SystemRoot '%wZ'\n",
@@ -134,21 +137,21 @@
* resides, as well verifying whether it is indeed an NTOS installation.
*/
RtlInitEmptyUnicodeString(&SystemRootPath, SystemRoot, sizeof(SystemRoot));
- if (!ArcPathToNtPath(&SystemRootPath, BootEntry->OsLoadPath, Data->PartList))
- {
- DPRINT1("ArcPathToNtPath(%S) failed, skip the installation.\n", BootEntry->OsLoadPath);
+ if (!ArcPathToNtPath(&SystemRootPath, Options->OsLoadPath, Data->PartList))
+ {
+ DPRINT1("ArcPathToNtPath(%S) failed, skip the installation.\n", Options->OsLoadPath);
/* Continue the enumeration */
return STATUS_SUCCESS;
}
DPRINT1("ArcPathToNtPath() succeeded: '%S' --> '%wZ'\n",
- BootEntry->OsLoadPath, &SystemRootPath);
+ Options->OsLoadPath, &SystemRootPath);
/*
* Check whether we already have an installation with this NT path.
* If this is the case, stop there.
*/
- NtOsInstall = FindExistingNTOSInstall(Data->List, NULL /*BootEntry->OsLoadPath*/, &SystemRootPath);
+ NtOsInstall = FindExistingNTOSInstall(Data->List, NULL /*Options->OsLoadPath*/, &SystemRootPath);
if (NtOsInstall)
{
DPRINT1(" An NTOS installation with name \"%S\" already exists in SystemRoot '%wZ'\n",
@@ -167,7 +170,7 @@
}
DPRINT1("Found a valid NTOS installation in SystemRoot ARC path '%S', NT path '%wZ'\n",
- BootEntry->OsLoadPath, &SystemRootPath);
+ Options->OsLoadPath, &SystemRootPath);
/* From the NT path, compute the disk, partition and path components */
if (NtPathToDiskPartComponents(SystemRootPath.Buffer, &DiskNumber, &PartitionNumber, &PathComponent))
@@ -200,7 +203,7 @@
StringCchPrintfW(InstallNameW, ARRAYSIZE(InstallNameW), L"%wZ \"%s\"",
&SystemRootPath, BootEntry->FriendlyName);
}
- AddNTOSInstallation(Data->List, BootEntry->OsLoadPath,
+ AddNTOSInstallation(Data->List, Options->OsLoadPath,
&SystemRootPath, PathComponent,
DiskNumber, PartitionNumber, PartEntry,
InstallNameW);
Author: pschweitzer
Date: Wed Jun 7 19:33:55 2017
New Revision: 74945
URL: http://svn.reactos.org/svn/reactos?rev=74945&view=rev
Log:
[UDFS]
Set the volume label with the logical volume ident contained in the file set descriptor.
Microsoft appears to do so, so mimic this behavior to have consistent volumes labels with Windows.
CORE-4375
Modified:
trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp
Modified: trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/u…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/udf_info/mount.cpp [iso-8859-1] Wed Jun 7 19:33:55 2017
@@ -2554,6 +2554,13 @@
UDFPrint(("SysStream at block=%x, partition=%d\n",
sysstream->logicalBlockNum, sysstream->partitionReferenceNum));
}
+#define CUR_IDENT_SZ (sizeof(fset->logicalVolIdent))
+ if (Vcb->VolIdent.Buffer) {
+ MyFreePool__(Vcb->VolIdent.Buffer);
+ }
+ UDFGetDstring(&(Vcb->VolIdent), (dstring*)&(fset->logicalVolIdent), CUR_IDENT_SZ);
+#undef CUR_IDENT_SZ
+ UDFPrint(("volIdent[] = '%ws'\n", Vcb->VolIdent.Buffer));
// Get current UDF revision
// Get Read-Only flags
UDFReadEntityID_Domain(Vcb, &(fset->domainIdent));