mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +00:00
Fixed algorithm for generating driver path.
svn path=/trunk/; revision=6998
This commit is contained in:
parent
a7d4741918
commit
9c5dbfa383
1 changed files with 9 additions and 2 deletions
|
@ -240,6 +240,7 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos)
|
||||||
U32 DriverGroupSize;
|
U32 DriverGroupSize;
|
||||||
|
|
||||||
UCHAR ImagePath[256];
|
UCHAR ImagePath[256];
|
||||||
|
UCHAR TempImagePath[256];
|
||||||
|
|
||||||
/* get 'service group order' key */
|
/* get 'service group order' key */
|
||||||
rc = RegOpenKey(NULL,
|
rc = RegOpenKey(NULL,
|
||||||
|
@ -304,9 +305,9 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos)
|
||||||
{
|
{
|
||||||
ValueSize = 256;
|
ValueSize = 256;
|
||||||
rc = RegQueryValue(hDriverKey,
|
rc = RegQueryValue(hDriverKey,
|
||||||
"ImagePathName",
|
"ImagePath",
|
||||||
NULL,
|
NULL,
|
||||||
(PUCHAR)ImagePath,
|
(PUCHAR)TempImagePath,
|
||||||
&ValueSize);
|
&ValueSize);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -316,8 +317,14 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos)
|
||||||
strcat(ImagePath, ServiceName);
|
strcat(ImagePath, ServiceName);
|
||||||
strcat(ImagePath, ".sys");
|
strcat(ImagePath, ".sys");
|
||||||
}
|
}
|
||||||
|
else if (TempImagePath[0] != '\\')
|
||||||
|
{
|
||||||
|
strcpy(ImagePath, szSystemRoot);
|
||||||
|
strcat(ImagePath, TempImagePath);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
strcpy(ImagePath, TempImagePath);
|
||||||
DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath));
|
DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath));
|
||||||
}
|
}
|
||||||
DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath));
|
DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue