[SFLOPPY] Move storage/floppy_new -> storage/class/sfloppy

This is a SCSI Floppy driver, which depends on classpnp.
Don't mix that with the other floppy (FDC) stack.
This commit is contained in:
Victor Perevertkin 2021-08-08 01:35:59 +03:00
parent 3088717b3f
commit 3927ad9d47
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
11 changed files with 148 additions and 26 deletions

View file

@ -2,3 +2,4 @@ add_subdirectory(cdrom)
add_subdirectory(classpnp)
add_subdirectory(disk)
add_subdirectory(ramdisk)
#add_subdirectory(sfloppy)

View file

@ -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)

View file

@ -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.

View file

@ -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

View file

@ -0,0 +1,22 @@
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1997 - 1999
//
// File: sfloppy.rc
//
//--------------------------------------------------------------------------
#include <windows.h>
#include <ntverp.h>
#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"

View file

@ -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

View file

@ -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)

View file

@ -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 <reactos/version.rc>

View file

@ -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