https://git.reactos.org/?p=reactos.git;a=commitdiff;h=82d2f13ceadbe0c86e0705...
commit 82d2f13ceadbe0c86e070597502efb783cbcea5a Author: Serge Gautherie 32623169+SergeGautherie@users.noreply.github.com AuthorDate: Tue Jan 14 18:50:19 2020 +0100 Commit: Hermès BÉLUSCA - MAÏTO hermes.belusca-maito@reactos.org CommitDate: Tue Jan 14 18:50:19 2020 +0100
[FLOPPY_NEW] WindowsSync to 8fb512a (#2238)
* [FLOPPY_NEW] Make 6 '#ifdef' explicit about '__REACTOS__'
* [FLOPPY_NEW] RtlStringCbPrintf?() need bytes, not chars
Import https://github.com/microsoft/Windows-driver-samples/commit/8fb512ac674df5ba1... --- drivers/storage/floppy_new/floppy.c | 20 ++++++++++---------- media/doc/README.FSD | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/storage/floppy_new/floppy.c b/drivers/storage/floppy_new/floppy.c index 01db49e5007..90f0615adfd 100644 --- a/drivers/storage/floppy_new/floppy.c +++ b/drivers/storage/floppy_new/floppy.c @@ -28,7 +28,7 @@ Revision History:
--*/
-#ifdef _MSC_VER +#if !defined(__REACTOS__) || defined(_MSC_VER) #pragma warning(disable:4214) // nonstandard extension used : bit field types other than int #pragma warning(disable:4201) // nonstandard extension used : nameless struct/union #endif @@ -585,7 +585,7 @@ ScsiFlopUnload( // using #pragma. //
-#ifdef _MSC_VER +#if !defined(__REACTOS__) || defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:28152) #endif @@ -699,7 +699,7 @@ Return Value: DeviceCount++;
status = RtlStringCbPrintfA((PCCHAR) name, - sizeof(name)/sizeof(UCHAR), + sizeof(name), "\Device\Floppy%u", DeviceCount); if (NT_SUCCESS(status)) { @@ -809,7 +809,7 @@ CreateFlopDeviceObjectExit: return status;
} // end CreateFlopDeviceObject() -#ifdef _MSC_VER +#if !defined(__REACTOS__) || defined(_MSC_VER) #pragma warning(pop) #endif
@@ -934,7 +934,7 @@ ScsiFlopInitDevice( return (STATUS_SUCCESS); }
-#ifdef _MSC_VER +#if !defined(__REACTOS__) || defined(_MSC_VER) #pragma warning(suppress:6262) // This function uses 1096 bytes of stack which exceed default value of 1024 bytes used by Code Analysis for flagging as warning #endif #ifdef __REACTOS__ @@ -974,7 +974,7 @@ NTSTATUS ScsiFlopStartDevice( //
RtlStringCbPrintfW(ntNameBuffer, - sizeof(ntNameBuffer)/sizeof(WCHAR), + sizeof(ntNameBuffer), L"\Device\Floppy%u", fdoExtension->DeviceNumber);
@@ -1020,7 +1020,7 @@ NTSTATUS ScsiFlopStartDevice( if (NT_SUCCESS(status)) {
RtlStringCbPrintfW(arcNameBuffer, - sizeof(arcNameBuffer)/sizeof(WCHAR), + sizeof(arcNameBuffer), L"\ArcName\scsi(%u)disk(%u)fdisk(%u)", scsiAddress.PortNumber, scsiAddress.TargetId, @@ -1042,7 +1042,7 @@ NTSTATUS ScsiFlopStartDevice( //
RtlStringCbPrintfW(arcNameBuffer, - sizeof(arcNameBuffer)/sizeof(WCHAR), + sizeof(arcNameBuffer), L"\ArcName\multi(%u)disk(%u)fdisk(%u)", 0, 0, @@ -2146,7 +2146,7 @@ Return Value:
// driveMediaType is bounded below by DriveMediaLimits[].LowestDriveMediaType -#ifdef _MSC_VER +#if !defined(__REACTOS__) || defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:33010) // 33010: Enum used as array index may be negative #endif @@ -2176,7 +2176,7 @@ Return Value: return TRUE; } } -#ifdef _MSC_VER +#if !defined(__REACTOS__) || defined(_MSC_VER) #pragma warning(pop) #endif } diff --git a/media/doc/README.FSD b/media/doc/README.FSD index 859b183edcc..28ff44cb991 100644 --- a/media/doc/README.FSD +++ b/media/doc/README.FSD @@ -20,7 +20,7 @@ The following FSD are shared with: https://github.com/Microsoft/Windows-driver-s
reactos/drivers/filesystems/fastfat_new # Synced to 2817004 reactos/drivers/filesystems/cdfs # Synced to f73e552 -reactos/drivers/storage/floppy_new # Synced to 9d23d43 +reactos/drivers/storage/floppy_new # Synced to 8fb512a
The following FS libs are shared with: https://github.com/dosfstools/dosfstools reactos/sdk/lib/fslib/vfatlib/check # Synced to 4.1