diff --git a/drivers/storage/class/CMakeLists.txt b/drivers/storage/class/CMakeLists.txt index f84026a6fa5..334af836a86 100644 --- a/drivers/storage/class/CMakeLists.txt +++ b/drivers/storage/class/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(cdrom) add_subdirectory(classpnp) add_subdirectory(disk) add_subdirectory(ramdisk) +#add_subdirectory(sfloppy) diff --git a/drivers/storage/class/sfloppy/CMakeLists.txt b/drivers/storage/class/sfloppy/CMakeLists.txt new file mode 100644 index 00000000000..41397d565c9 --- /dev/null +++ b/drivers/storage/class/sfloppy/CMakeLists.txt @@ -0,0 +1,11 @@ + +list(APPEND SOURCE + guid.c + floppy.c) + +add_library(sfloppy MODULE ${SOURCE} floppy.rc) +set_module_type(sfloppy kernelmodedriver) +add_importlibs(sfloppy classpnp hal ntoskrnl) +add_cd_file(TARGET sfloppy DESTINATION reactos/system32/drivers NO_CAB FOR all) +add_driver_inf(sfloppy sfloppy.inf) +add_registry_inf(sfloppy_reg.inf) diff --git a/drivers/storage/floppy_new/floppy.c b/drivers/storage/class/sfloppy/floppy.c similarity index 100% rename from drivers/storage/floppy_new/floppy.c rename to drivers/storage/class/sfloppy/floppy.c diff --git a/drivers/storage/floppy_new/guid.c b/drivers/storage/class/sfloppy/guid.c similarity index 100% rename from drivers/storage/floppy_new/guid.c rename to drivers/storage/class/sfloppy/guid.c diff --git a/drivers/storage/class/sfloppy/license.txt b/drivers/storage/class/sfloppy/license.txt new file mode 100644 index 00000000000..6ef3ee38d1c --- /dev/null +++ b/drivers/storage/class/sfloppy/license.txt @@ -0,0 +1,23 @@ +The Microsoft Public License (MS-PL) +Copyright (c) 2015 Microsoft + +This license governs use of the accompanying software. If you use the software, you + accept this license. If you do not accept the license, do not use the software. + +1. Definitions + The terms "reproduce," "reproduction," "derivative works," and "distribution" have the + same meaning here as under U.S. copyright law. + A "contribution" is the original software, or any additions or changes to the software. + A "contributor" is any person that distributes its contribution under this license. + "Licensed patents" are a contributor's patent claims that read directly on its contribution. + +2. Grant of Rights + (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. + (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. + +3. Conditions and Limitations + (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. + (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. + (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. + (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. + (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. diff --git a/drivers/storage/class/sfloppy/sfloppy.inf b/drivers/storage/class/sfloppy/sfloppy.inf new file mode 100644 index 00000000000..5eb2f79aec8 --- /dev/null +++ b/drivers/storage/class/sfloppy/sfloppy.inf @@ -0,0 +1,87 @@ +; sfloppy.inf +; +; Installation inf for the Floppy Disk Driver (DDK Sample). +; +; (c) Copyright 2002 Microsoft +; +[Version] +Signature="$WINDOWS NT$" +Class=FloppyDisk +ClassGuid={4D36E980-E325-11CE-BFC1-08002BE10318} +Provider=%ProviderString% +CatalogFile=ddk_sample.cat +DriverVer=05/17/2002,5.2.3635.0 + +;You must specify which platform is supported by each SourceDisksNames section +;Valid platform identifiers include .x86, .ia64, .alpha, .axp64 +[SourceDisksNames] +12=%floppyClassName%,,, + +;You must also specify which platform is supported by each SourceDisksFiles section +;Valid platform identifiers include .x86, .ia64, .alpha, .axp64 +[SourceDisksFiles] +sfloppy.sys=12 + +[ControlFlags] +ExcludeFromSelect=* + +[DestinationDirs] +sfloppy_copyfiles=12 +DefaultDestDir=12 + +[Manufacturer] +%ManufacturerName%=floppy_device,NTx86,NTia64,NTamd64 + +[floppy_device.NTx86] +%sfloppy_devdesc%=sfloppy_install,GenSFloppy +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskMATSHITALS-120_COSM___04 +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskCOMPAQ__LS-120_VER5___AB +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskCOMPAQ__LS-120_HIMA___01 +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskMATSHITALS-120_VER5___00 + +[floppy_device.NTia64] +%sfloppy_devdesc%=sfloppy_install,GenSFloppy +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskMATSHITALS-120_COSM___04 +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskCOMPAQ__LS-120_VER5___AB +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskCOMPAQ__LS-120_HIMA___01 +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskMATSHITALS-120_VER5___00 + +[floppy_device.NTamd64] +%sfloppy_devdesc%=sfloppy_install,GenSFloppy +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskMATSHITALS-120_COSM___04 +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskCOMPAQ__LS-120_VER5___AB +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskCOMPAQ__LS-120_HIMA___01 +%sfloppy_devdesc%=sfloppy_install,SCSI\DiskMATSHITALS-120_VER5___00 + +;; +;; super floppy +;; +[sfloppy_install.NT] +CopyFiles=sfloppy_copyfiles + +[sfloppy_copyfiles] +sfloppy.sys + +[sfloppy_install.NT.Services] +AddService=sfloppy,2,sfloppy_ServiceInstallSection + +[sfloppy_ServiceInstallSection] +DisplayName=%sfloppy_devdesc% +ServiceType=1 +StartType=3 +ErrorControl=1 +ServiceBinary = %12%\sfloppy.sys + +[sfloppy_install.NT.HW] +AddReg=sfloppyEnable.RegHW + +[sfloppyEnable.RegHW] +HKR,,SuperFloppy,%REG_DWORD%,0x00000001 + +[Strings] +ProviderString="TODO-Set-Provider" +ManufacturerName="TODO-Set-Manufacturer" +floppyClassName="Floppy disk drives" +sfloppy_devdesc="High-Capacity Floppy Disk Drive" + +REG_DWORD=0x00010001 diff --git a/drivers/storage/class/sfloppy/sfloppy.rc b/drivers/storage/class/sfloppy/sfloppy.rc new file mode 100644 index 00000000000..f08b614ef81 --- /dev/null +++ b/drivers/storage/class/sfloppy/sfloppy.rc @@ -0,0 +1,22 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// +// Copyright (C) Microsoft Corporation, 1997 - 1999 +// +// File: sfloppy.rc +// +//-------------------------------------------------------------------------- + +#include + +#include + +#define VER_FILETYPE VFT_DRV +#define VER_FILESUBTYPE VFT2_DRV_SYSTEM +#define VER_FILEDESCRIPTION_STR "SCSI Floppy Driver" +#define VER_INTERNALNAME_STR "sfloppy.sys" +#define VER_ORIGINALFILENAME_STR "sfloppy.sys" +#define VER_LANGNEUTRAL + +#include "common.ver" diff --git a/drivers/storage/floppy_new/floppy_reg.inf b/drivers/storage/class/sfloppy/sfloppy_reg.inf similarity index 87% rename from drivers/storage/floppy_new/floppy_reg.inf rename to drivers/storage/class/sfloppy/sfloppy_reg.inf index ad620f4b3ee..32f92141240 100644 --- a/drivers/storage/floppy_new/floppy_reg.inf +++ b/drivers/storage/class/sfloppy/sfloppy_reg.inf @@ -1,7 +1,7 @@ -; Floppy driver +; SCSI Floppy driver [AddReg] HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Group",0x00000000,"Primary Disk" -HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ImagePath",0x00020000,"system32\drivers\floppy.sys" +HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ImagePath",0x00020000,"system32\drivers\sfloppy.sys" HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Start",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Type",0x00010001,0x00000001 diff --git a/drivers/storage/floppy_new/CMakeLists.txt b/drivers/storage/floppy_new/CMakeLists.txt deleted file mode 100644 index f52dba85b1a..00000000000 --- a/drivers/storage/floppy_new/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -list(APPEND SOURCE - guid.c - floppy.c) - -add_library(floppy MODULE ${SOURCE} floppy.rc) -set_module_type(floppy kernelmodedriver) -add_importlibs(floppy classpnp hal ntoskrnl) -add_cd_file(TARGET floppy DESTINATION reactos/system32/drivers NO_CAB FOR all) -add_registry_inf(floppy_reg.inf) diff --git a/drivers/storage/floppy_new/floppy.rc b/drivers/storage/floppy_new/floppy.rc deleted file mode 100644 index d23ec119d46..00000000000 --- a/drivers/storage/floppy_new/floppy.rc +++ /dev/null @@ -1,13 +0,0 @@ -/* - * PROJECT: ReactOS Floppy Driver - * LICENSE: GPL - See COPYING in the top level directory - * FILE: drivers/storage/floppy/floppy.rc - * PURPOSE: Resource definition file - * PROGRAMMERS: Vizzini (vizzini@plasmic.com) - */ - -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "Floppy Disk Controller Driver" -#define REACTOS_STR_INTERNAL_NAME "floppy" -#define REACTOS_STR_ORIGINAL_FILENAME "floppy.sys" -#include diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt index bc533b0d833..745f329f1bd 100644 --- a/media/doc/3rd Party Files.txt +++ b/media/doc/3rd Party Files.txt @@ -133,8 +133,8 @@ Used Version: git commit 3428c5f License: MS-PL (https://spdx.org/licenses/MS-PL.html) URL: https://github.com/microsoft/Windows-driver-samples/tree/master/storage/class/disk -Title: Microsoft Super Floppy (sfloppy) Storage Class Driver -Path: drivers/storage/floppy_new +Title: Microsoft SCSI Floppy (sfloppy) Storage Class Driver +Path: drivers/storage/class/sfloppy Used Version: git commit 8fb512a License: MS-PL (https://spdx.org/licenses/MS-PL.html) URL: https://github.com/microsoft/Windows-driver-samples/tree/master/storage/sfloppy