mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
- When checking for ReactOS cd-rom, in addition to 'reactos/ntoskrnl.exe' check also for 'reactos/system32/ntoskrnl.exe'.
svn path=/trunk/; revision=9554
This commit is contained in:
parent
716bbd44ba
commit
55532b15d9
1 changed files with 35 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: arcname.c,v 1.17 2004/05/02 22:49:24 hbirr Exp $
|
||||
/* $Id: arcname.c,v 1.18 2004/05/29 21:28:28 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -258,6 +258,10 @@ IopCheckCdromDevices(PULONG DeviceNumber)
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check for 'reactos/ntoskrnl.exe' first...
|
||||
*/
|
||||
|
||||
swprintf(DeviceNameBuffer,
|
||||
L"\\Device\\CdRom%lu\\reactos\\ntoskrnl.exe",
|
||||
i);
|
||||
|
@ -285,6 +289,36 @@ IopCheckCdromDevices(PULONG DeviceNumber)
|
|||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* ...and for 'reactos/system32/ntoskrnl.exe' also.
|
||||
*/
|
||||
|
||||
swprintf(DeviceNameBuffer,
|
||||
L"\\Device\\CdRom%lu\\reactos\\system32\\ntoskrnl.exe",
|
||||
i);
|
||||
RtlInitUnicodeString(&DeviceName,
|
||||
DeviceNameBuffer);
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&DeviceName,
|
||||
0,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
Status = NtOpenFile(&Handle,
|
||||
FILE_ALL_ACCESS,
|
||||
&ObjectAttributes,
|
||||
&IoStatusBlock,
|
||||
0,
|
||||
0);
|
||||
DPRINT("NtOpenFile() DeviceNumber %lu Status %lx\n", i, Status);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("Found ntoskrnl.exe on Cdrom%lu\n", i);
|
||||
NtClose(Handle);
|
||||
*DeviceNumber = i;
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
DPRINT("Could not find ntoskrnl.exe\n");
|
||||
|
|
Loading…
Reference in a new issue