https://git.reactos.org/?p=reactos.git;a=commitdiff;h=da4ee18cc96a0cf0d3a7b…
commit da4ee18cc96a0cf0d3a7b5b1ae6dffcc55f90ad8
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Tue Nov 3 23:12:40 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Tue Nov 3 23:12:40 2020 +0300
[STORPROP][CDROM_NEW][DISK_NEW] Improve disk and cdrom device installation
- Take a proper inf file for disk.sys
- Add class information into cdrom.inf
- Make a correct stub for storprop!DvdClassInstaller
---
dll/win32/storprop/storprop.c | 12 ++
dll/win32/storprop/storprop.spec | 2 +-
drivers/storage/class/cdrom_new/cdrom.inf | 40 +++--
drivers/storage/class/disk_new/disk.inf | 259 ++++++++++++++++++------------
4 files changed, 201 insertions(+), 112 deletions(-)
diff --git a/dll/win32/storprop/storprop.c b/dll/win32/storprop/storprop.c
index 09149c8d795..ba37599da96 100644
--- a/dll/win32/storprop/storprop.c
+++ b/dll/win32/storprop/storprop.c
@@ -32,6 +32,18 @@ DiskClassInstaller(
return ERROR_DI_DO_DEFAULT;
}
+DWORD
+WINAPI
+DvdClassInstaller(
+ _In_ DI_FUNCTION InstallFunction,
+ _In_ HDEVINFO DeviceInfoSet,
+ _In_ PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
+{
+ DPRINT("DvdClassInstaller(%u %p %p)\n",
+ InstallFunction, DeviceInfoSet, DeviceInfoData);
+
+ return ERROR_DI_DO_DEFAULT;
+}
BOOL
WINAPI
diff --git a/dll/win32/storprop/storprop.spec b/dll/win32/storprop/storprop.spec
index f04a9ac8020..d096e6b78e8 100644
--- a/dll/win32/storprop/storprop.spec
+++ b/dll/win32/storprop/storprop.spec
@@ -3,7 +3,7 @@
@ stub CdromIsDigitalPlaybackEnabled
@ stdcall DiskClassInstaller(long ptr ptr)
@ stdcall DllMain(ptr long ptr)
-@ stub DvdClassInstaller
+@ stdcall DvdClassInstaller(long ptr ptr)
@ stub DvdLauncher
@ stub DvdPropPageProvider
@ stub IdePropPageProvider
diff --git a/drivers/storage/class/cdrom_new/cdrom.inf
b/drivers/storage/class/cdrom_new/cdrom.inf
index 89220976529..5a33abd5049 100644
--- a/drivers/storage/class/cdrom_new/cdrom.inf
+++ b/drivers/storage/class/cdrom_new/cdrom.inf
@@ -3,13 +3,13 @@
;
[Version]
-Signature = "$WINDOWS NT$"
+Signature = "$WINDOWS NT$"
LayoutFile = layout.inf
-Class = CDROM
-ClassGuid = {4D36E965-E325-11CE-BFC1-08002BE10318}
-Provider = %MSFT%
+Class = CDROM
+ClassGUID = {4D36E965-E325-11CE-BFC1-08002BE10318}
+Provider = %MSFT%
; Git commit 96eb96d @
https://github.com/microsoft/Windows-driver-samples
-DriverVer = 08/11/2016, 1.0
+DriverVer = 08/11/2016, 1.0
;[SourceDisksNames]
;3426=windows cd
@@ -19,6 +19,18 @@ DriverVer = 08/11/2016, 1.0
[DestinationDirs]
cdrom_copyfiles = 12
+storprop_CopyFiles.NT = 11
+
+[ClassInstall32.NT]
+AddReg = CDROMClass.NT.AddReg
+Copyfiles = storprop_CopyFiles.NT
+
+[CDROMClass.NT.AddReg]
+HKR, , , 0, %CDROMClassName%
+HKR, , Icon, 0, "-51"
+HKR, , Installer32, 0, "storprop.dll,DvdClassInstaller"
+HKR, , NoInstallClass, 0, 1
+HKR, , SilentInstall, 0, 1
[cdrom_copyfiles]
cdrom.sys,,,0x100
@@ -27,8 +39,10 @@ cdrom.sys,,,0x100
BasicDriverOk=*
[Manufacturer]
-%MITSUMI% = mitsumi_cdrom,NT$ARCH$
-%GenManufacturer% = cdrom_device,NT$ARCH$
+%MITSUMI% = mitsumi_cdrom,NT
+%GenManufacturer% = cdrom_device,NT
+;%MITSUMI% = mitsumi_cdrom,NT$ARCH$
+;%GenManufacturer% = cdrom_device,NT$ARCH$
;[mitsumi_cdrom.NT$ARCH$]
[mitsumi_cdrom.NT]
@@ -135,13 +149,17 @@ AddReg=autorun_addreg
[cdrom_EventLog_InstallSection]
;AddReg=cdrom_EventLog_AddReg
-;[cdrom_EventLog_AddReg]
-;HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll"
-;HKR,,TypesSupported,0x00010001,7
+[cdrom_EventLog_AddReg]
+HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll"
+HKR,,TypesSupported,0x00010001,7
+
+[storprop_CopyFiles.NT]
+storprop.dll
[Strings]
-MSFT = "Microsoft"
+MSFT = "Microsoft"
+CDROMClassName = "DVD/CD-ROM drives"
;; Manufacturer specific strings
MITSUMI = "Mitsumi"
diff --git a/drivers/storage/class/disk_new/disk.inf
b/drivers/storage/class/disk_new/disk.inf
index 810f95e5793..421c2a5660e 100644
--- a/drivers/storage/class/disk_new/disk.inf
+++ b/drivers/storage/class/disk_new/disk.inf
@@ -1,10 +1,9 @@
-; DISK.INF
-
-; Installation of DISK DRIVESs
+;
+; Copyright (c) Microsoft Corporation. All rights reserved.
+;
[Version]
-Signature = "$Windows NT$"
-;Signature = "$ReactOS$"
+Signature = "$WINDOWS NT$"
LayoutFile = layout.inf
Class = DiskDrive
ClassGUID = {4D36E967-E325-11CE-BFC1-08002BE10318}
@@ -12,8 +11,27 @@ Provider = %MSFT%
; Git commit 3428c5f @
https://github.com/microsoft/Windows-driver-samples
DriverVer = 08/29/2018, 1.0
+;[SourceDisksNames]
+;3426=windows cd
+
+;[SourceDisksFiles]
+;disk.sys = 3426
+
+;;
+;; The AutoRunAlwaysDisable key is only for use when the hardware cannot
+;; accepts TEST_UNIT_READY commands. Disabling 'AutoRun' or including
+;; devices in this list will prevent removable media services from being
+;; able to properly handle these devices.
+;;
+
+[autorun_addreg]
+HKLM,"System\CurrentControlSet\Services\disk","AutoRunAlwaysDisable",
0x00010008, "Brother RemovableDisk(U)"
+
+[disk_copyfiles]
+disk.sys,,,0x100
+
[DestinationDirs]
-disk_CopyFiles.NT = 12
+disk_copyfiles=12
storprop_CopyFiles.NT = 11
[ClassInstall32.NT]
@@ -22,108 +40,149 @@ Copyfiles = storprop_CopyFiles.NT
[DiskClass.NT.AddReg]
HKR, , , 0, %DiskClassName%
-HKR, , Installer32, 0, "storprop.dll,DiskClassInstaller"
HKR, , Icon, 0, "-53"
+HKR, , Installer32, 0, "storprop.dll,DiskClassInstaller"
HKR, , NoInstallClass, 0, 1
HKR, , SilentInstall, 0, 1
-[Manufacturer]
-%GenericMfg% = GenericMfg
-
-[GenericMfg]
-%Disk.DeviceDesc% = disk_Inst,GenDisk
-%OpticalDisk.DeviceDesc% = disk_Inst,GenOptical
+[ControlFlags]
+BasicDriverOk=*
-;----------------------------- DISK DRIVER -----------------------------
-
-[disk_Inst.NT]
-CopyFiles = disk_CopyFiles.NT
-
-[disk_Inst.NT.Services]
-AddService = disk, 2, disk_Service_Inst
-
-[disk_Service_Inst]
-DisplayName = %Disk.ServiceDesc%
-ServiceType = 1
-StartType = 0
-ErrorControl = 1
-ServiceBinary = %12%\disk.sys
-
-[disk_CopyFiles.NT]
-disk.sys
-
-;---------------------------- DISK INSTALLER ----------------------------
+[Manufacturer]
+%GenManufacturer%=disk_device,NT
+%Compaq%=compaq,NT
+%Mylex%=mylex,NT
+;%GenManufacturer%=disk_device,NT$ARCH$
+;%Compaq%=compaq,NT$ARCH$
+;%Mylex%=mylex,NT$ARCH$
+
+;[disk_device.NT$ARCH$]
+[disk_device.NT]
+%disk_devdesc% = disk_install, GenDisk
+%opticaldisk_devdesc% = disk_install, GenOptical
+%disk_devdesc% = disk_install, USBSTOR\DiskSony____MSC-U01_________
+%disk_devdesc% = disk_install, USBSTOR\DiskSony____MSC-U01N________
+%disk_devdesc% = media_unlockable_disk_install,
IDE\DiskIOMEGA_ZIP_100__________________________
+%disk_devdesc% = media_unlockable_disk_install, SCSI\DiskIOMEGA__ZIP_100_________
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\FUJITSU&DynaMO-FE_OPTICAL_DRIVE&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\&SYM13FW500-DISK_DRIVE&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\&WDxxxA001RTL-Disk_Drive&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MAC_TECHNOLOGIESINC.&MAC_THIN_FIREWIRE_DRIVE&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\VST_TECHNOLOGIESINC.&VST_THIN_FIREWIRE_DRIVE&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\Sony&PCVA-HD04&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LSI_Logic&SYM13FW500-DISK_DRIVE&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MELCO_INC&1394MEL-HD_DRIVE_&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MELCO_INC&1394MEL-HD_DRIVE&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\MELCO_INC&1394MEL-MO_DRIVE_&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LMO-PFU&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LMO-AF&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\OXFW900_&LHD-SF__&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LHD-PFU&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\LOGITEC&LHD_AF&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\I-O_DATA_DEVICE_INC.&1394_Converter__&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\API-903-95__&1394_Storage_+_Repeater_&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_orderly_removal_disk_install,
SBP2\Sony&PCVA-HD08A&CmdSetId104d8&GenDisk
+%disk_devdesc% = expect_surprise_removal_disk_install, LEXARUSB\GenDisk
+%disk_devdesc% = expect_surprise_removal_disk_install, SCSI\DiskToshiba_SD_Mem_Driver___
+%disk_devdesc% = disk_install_VHD_drive, SCSI\DiskMsft____Virtual_Disk____
+
+;[compaq.NT$ARCH$]
+[compaq.NT]
+%compaq_array.DeviceDesc% = disk_install, SCSI\DiskCompaq__Disk_Array______
+
+;[mylex.NT$ARCH$]
+[mylex.NT]
+%mylex_array.DeviceDesc% = disk_install, SCSI\DiskMYLEX___
+
+[media_unlockable_disk_install.NT]
+CopyFiles=disk_copyfiles
+
+[media_unlockable_disk_install.NT.Services]
+AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
+
+[media_unlockable_disk_install.NT.HW]
+AddReg=media_unlockable_disk_install_HW.AddReg
+
+[media_unlockable_disk_install_HW.AddReg]
+HKR,"Classpnp","HackMask",0x00010001,0x1 ; Device cannot lock media
+
+[expect_orderly_removal_disk_install.NT]
+CopyFiles=disk_copyfiles
+
+[expect_orderly_removal_disk_install.NT.Services]
+AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
+
+[expect_orderly_removal_disk_install.NT.HW]
+AddReg=expect_orderly_removal_disk_install_HW.AddReg
+
+[expect_orderly_removal_disk_install_HW.AddReg]
+HKR,,"RemovalPolicy",0x00010001,0x2 ; ExpectOrderlyRemoval
+
+[expect_surprise_removal_disk_install.NT]
+CopyFiles=disk_copyfiles
+
+[expect_surprise_removal_disk_install.NT.Services]
+AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
+
+[expect_surprise_removal_disk_install.NT.HW]
+AddReg=expect_surprise_removal_disk_install_HW.AddReg
+
+[expect_surprise_removal_disk_install_HW.AddReg]
+HKR,,"RemovalPolicy",0x00010001,0x3 ; ExpectSurpriseRemoval
+
+[disk_install_VHD_drive.NT]
+CopyFiles=disk_copyfiles
+
+[disk_install_VHD_drive.NT.Services]
+AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
+
+[disk_install_VHD_drive.NT.HW]
+AddReg=disk_install_VHD_drive.AddReg
+
+[disk_install_VHD_drive.AddReg]
+HKR,,"FriendlyName",,%VHD_Generic_FriendlyName% ; Give VHD drives a more
friendly name
+
+[disk_install.NT]
+CopyFiles=disk_copyfiles
+ExcludeId=GenSFloppy,SCSI\DiskMATSHITALS-120_COSM___04,SCSI\DiskCOMPAQ__LS-120_VER5___AB
+ExcludeId=SCSI\DiskCOMPAQ__LS-120_HIMA___01,SCSI\DiskMATSHITALS-120_VER5___00
+ExcludeId=SCSI\DiskMATSHITALS-120/240____00
+DiskCiPrivateData=4
+
+[disk_install.NT.Services]
+AddService=disk,2,disk_ServiceInstallSection,disk_EventLog_InstallSection
+
+[disk_ServiceInstallSection]
+DisplayName=%disk_ServiceDesc%
+ServiceType=1
+StartType=0
+ErrorControl=1
+ServiceBinary = %12%\disk.sys
+AddReg=autorun_addreg
+
+[disk_EventLog_InstallSection]
+;AddReg=disk_EventLog_AddReg
+
+[disk_EventLog_AddReg]
+HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll"
+HKR,,TypesSupported,0x00010001,7
[storprop_CopyFiles.NT]
storprop.dll
-;-------------------------------- STRINGS -------------------------------
[Strings]
-ReactOS = "ReactOS Team"
-GenericMfg = "(Generic Disk Drives)"
-DiskClassName = "Disk Drives"
-Disk.DeviceDesc = "Disk Drive"
-OpticalDisk.DeviceDesc = "Optical Disk Drive"
-Disk.ServiceDesc = "Disk Driver"
-
-[Strings.0405]
-GenericMfg = "(Obecné diskové jednotky)"
-DiskClassName = "Diskové jednotky"
-Disk.DeviceDesc = "Disková jednotka"
-OpticalDisk.DeviceDesc = "Optická disková jednotka"
-Disk.ServiceDesc = "Ovladač disku"
-
-[Strings.0a]
-ReactOS = "Equipo de ReactOS"
-GenericMfg = "(Unidades de disco genéricas)"
-DiskClassName = "Unidades de disco"
-Disk.DeviceDesc = "Unidad de disco"
-OpticalDisk.DeviceDesc = "Unidad de disco óptico"
-Disk.ServiceDesc = "Controlador de disco"
-
-[Strings.0415]
-ReactOS = "Zespół ReactOS"
-GenericMfg = "(Standardowy dysk twardy)"
-DiskClassName = "Dyski twarde"
-Disk.DeviceDesc = "Dysk twardy"
-OpticalDisk.DeviceDesc = "Dysk optyczny"
-Disk.ServiceDesc = "Sterownik dysku"
-
-[Strings.0418]
-ReactOS = "Echipa ReactOS"
-GenericMfg = "(dispozitiv disc generic)"
-DiskClassName = "Dispozitive disc"
-Disk.DeviceDesc = "Dispozitiv disc"
-OpticalDisk.DeviceDesc = "Dispozitiv disc optic"
-Disk.ServiceDesc = "Modúl-pilot de disc"
-
-[Strings.0419]
-ReactOS = "Команда ReactOS"
-GenericMfg = "(Стандартные дисковые накопители)"
-DiskClassName = "Дисковые устройства"
-Disk.DeviceDesc = "Дисковое устройство"
-OpticalDisk.DeviceDesc = "Оптическое дисковое устройство"
-Disk.ServiceDesc = "Драйвер диска"
-
-[Strings.041f]
-ReactOS = "ReactOS Takımı"
-GenericMfg = "(Umûmî Disk Sürücüleri)"
-DiskClassName = "Disk Sürücüleri"
-Disk.DeviceDesc = "Disk Sürücüsü"
-OpticalDisk.DeviceDesc = "Optik Disk Sürücüsü"
-Disk.ServiceDesc = "Disk Sürücüsü"
-
-[Strings.0422]
-ReactOS = "Команда ReactOS"
-GenericMfg = "(Стандартні приводи дисків)"
-DiskClassName = "Дискові приводи"
-Disk.DeviceDesc = "Дисковий привід"
-OpticalDisk.DeviceDesc = "Оптичний привід дисків"
-Disk.ServiceDesc = "Драйвер диску"
-
-[Strings.0804]
-GenericMfg = "(通用磁盘驱动器)"
-Disk.DeviceDesc = "磁盘驱动器"
-OpticalDisk.DeviceDesc = "光盘驱动器"
-Disk.ServiceDesc = "磁盘驱动器"
+MSFT="Microsoft"
+DiskClassName="Disk drives"
+GenManufacturer="(Standard disk drives)"
+Compaq="Compaq"
+Mylex="Mylex"
+
+disk_devdesc="Disk drive"
+opticaldisk_devdesc="Optical disk drive"
+
+disk_ServiceDesc="Disk Driver"
+compaq_array.DeviceDesc = "Compaq SCSI Drive Array"
+mylex_array.DeviceDesc = "Mylex RAID Disk Device"
+
+VHD_Generic_FriendlyName = "Microsoft Virtual Disk"