mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:35:59 +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;
|
||||
|
||||
UCHAR ImagePath[256];
|
||||
UCHAR TempImagePath[256];
|
||||
|
||||
/* get 'service group order' key */
|
||||
rc = RegOpenKey(NULL,
|
||||
|
@ -304,9 +305,9 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos)
|
|||
{
|
||||
ValueSize = 256;
|
||||
rc = RegQueryValue(hDriverKey,
|
||||
"ImagePathName",
|
||||
"ImagePath",
|
||||
NULL,
|
||||
(PUCHAR)ImagePath,
|
||||
(PUCHAR)TempImagePath,
|
||||
&ValueSize);
|
||||
if (rc != ERROR_SUCCESS)
|
||||
{
|
||||
|
@ -316,8 +317,14 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos)
|
|||
strcat(ImagePath, ServiceName);
|
||||
strcat(ImagePath, ".sys");
|
||||
}
|
||||
else if (TempImagePath[0] != '\\')
|
||||
{
|
||||
strcpy(ImagePath, szSystemRoot);
|
||||
strcat(ImagePath, TempImagePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(ImagePath, TempImagePath);
|
||||
DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath));
|
||||
}
|
||||
DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue