LARGE_INTEGER CurrentOffset;
//
- // Check if we're a CDROM-type RAM disk
+ // Check if we're a boot RAM disk
//
DiskType = Input->DiskType;
- if (DiskType > FILE_DEVICE_CD_ROM)
+ if (DiskType >= RAMDISK_BOOT_DISK)
{
//
// Check if we're an ISO
//
- if (DiskType == FILE_DEVICE_CD_ROM_FILE_SYSTEM)
+ if (DiskType == RAMDISK_BOOT_DISK)
{
//
// NTLDR mounted us somewhere
else
{
//
- // The only other possibility is a controller
+ // The only other possibility is a WIM disk
//
- if (DiskType != FILE_DEVICE_CONTROLLER)
+ if (DiskType != RAMDISK_WIM_DISK)
+ {
+ //
+ // Fail
+ //
return STATUS_INVALID_PARAMETER;
+ }
//
// Read the view count instead
//
// It this an ISO boot ramdisk?
//
- if (Input->DiskType == FILE_DEVICE_CD_ROM_FILE_SYSTEM)
+ if (Input->DiskType == RAMDISK_BOOT_DISK)
{
//
// Does it need a drive letter?
GuidString.Buffer = NULL;
//
- // Check if this is an ISO boot, or a registry ram drive
+ // Check if this is an boot disk, or a registry ram drive
//
if (!(Input->Options.ExportAsCd) &&
- (Input->DiskType == FILE_DEVICE_CD_ROM_FILE_SYSTEM))
+ (Input->DiskType == RAMDISK_BOOT_DISK))
{
//
// Not an ISO boot, but it's a boot FS -- map it to figure out the
// Validate the disk type
//
DiskType = Input->DiskType;
- if (DiskType == FILE_DEVICE_CONTROLLER) return STATUS_INVALID_PARAMETER;
+ if (DiskType == RAMDISK_WIM_DISK) return STATUS_INVALID_PARAMETER;
//
// Look at the disk type
//
- if (DiskType == FILE_DEVICE_CD_ROM_FILE_SYSTEM)
+ if (DiskType == RAMDISK_BOOT_DISK)
{
//
// We only allow this as an early-init boot
//
// Validate the disk type
//
- if ((Input->Options.ExportAsCd) &&
- (DiskType != FILE_DEVICE_CD_ROM_FILE_SYSTEM))
+ if ((Input->Options.ExportAsCd) && (DiskType != RAMDISK_BOOT_DISK))
{
//
// If the type isn't CDFS, it has to at least be raw CD
//
- if (DiskType != FILE_DEVICE_CD_ROM) return STATUS_INVALID_PARAMETER;
+ if (DiskType != RAMDISK_MEMORY_MAPPED_DISK) return STATUS_INVALID_PARAMETER;
}
//
// Check if this is an actual file
//
- if (DiskType <= FILE_DEVICE_CD_ROM)
+ if (DiskType <= RAMDISK_MEMORY_MAPPED_DISK)
{
//
// Validate the file name
//
// See if we want to do this sync or async
//
- if (DeviceExtension->DiskType > FILE_DEVICE_CD_ROM)
+ if (DeviceExtension->DiskType > RAMDISK_MEMORY_MAPPED_DISK)
{
//
// Do it sync