mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
Fixed a small bug in IopInitializeBuiltinDriver.
svn path=/trunk/; revision=6338
This commit is contained in:
parent
1e3b13361d
commit
db8287ce57
1 changed files with 15 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: driver.c,v 1.26 2003/10/16 14:49:05 ekohl Exp $
|
/* $Id: driver.c,v 1.27 2003/10/16 17:59:48 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -438,6 +438,7 @@ IopInitializeBuiltinDriver(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
CHAR TextBuffer[256];
|
CHAR TextBuffer[256];
|
||||||
PCHAR FileNameWithoutPath;
|
PCHAR FileNameWithoutPath;
|
||||||
|
LPWSTR FileExtension;
|
||||||
|
|
||||||
DPRINT("Initializing driver '%s' at %08lx, length 0x%08lx\n",
|
DPRINT("Initializing driver '%s' at %08lx, length 0x%08lx\n",
|
||||||
FileName, ModuleLoadBase, ModuleLength);
|
FileName, ModuleLoadBase, ModuleLength);
|
||||||
|
@ -466,11 +467,13 @@ IopInitializeBuiltinDriver(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate filename without patch (not needed by freeldr)
|
* Generate filename without path (not needed by freeldr)
|
||||||
*/
|
*/
|
||||||
FileNameWithoutPath = strrchr(FileName, '\\');
|
FileNameWithoutPath = strrchr(FileName, '\\');
|
||||||
if (FileNameWithoutPath == NULL)
|
if (FileNameWithoutPath == NULL)
|
||||||
|
{
|
||||||
FileNameWithoutPath = FileName;
|
FileNameWithoutPath = FileName;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Load the module
|
* Load the module
|
||||||
|
@ -487,6 +490,16 @@ IopInitializeBuiltinDriver(
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Strip the file extension from ServiceName
|
||||||
|
*/
|
||||||
|
FileExtension = wcsrchr(DeviceNode->ServiceName.Buffer, '.');
|
||||||
|
if (FileExtension != NULL)
|
||||||
|
{
|
||||||
|
DeviceNode->ServiceName.Length -= wcslen(DeviceNode->ServiceName.Buffer);
|
||||||
|
FileExtension[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the driver
|
* Initialize the driver
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue