@@ -46,6 +46,12 @@ Revision History:
46
46
#include <ntstrsafe.h>
47
47
#include <intsafe.h>
48
48
49
+ #ifdef __REACTOS__
50
+ // Downgrade unsupported NT6.2+ features.
51
+ #define NonPagedPoolNx NonPagedPool
52
+ #define NonPagedPoolNxCacheAligned NonPagedPoolCacheAligned
53
+ #endif
54
+
49
55
#define MODE_DATA_SIZE 192
50
56
#define SCSI_FLOPPY_TIMEOUT 20
51
57
#define SFLOPPY_SRB_LIST_SIZE 4
@@ -834,11 +840,7 @@ ScsiFlopInitDevice(
834
840
// Allocate request sense buffer.
835
841
//
836
842
837
- #ifndef __REACTOS__
838
843
senseData = ExAllocatePool (NonPagedPoolNxCacheAligned , SENSE_BUFFER_SIZE );
839
- #else
840
- senseData = ExAllocatePool (NonPagedPoolCacheAligned , SENSE_BUFFER_SIZE );
841
- #endif
842
844
843
845
if (senseData == NULL ) {
844
846
@@ -1160,11 +1162,7 @@ Return Value:
1160
1162
//
1161
1163
Irp -> IoStatus .Information = 0 ;
1162
1164
1163
- #ifndef __REACTOS__
1164
1165
srb = ExAllocatePool (NonPagedPoolNx , SCSI_REQUEST_BLOCK_SIZE );
1165
- #else
1166
- srb = ExAllocatePool (NonPagedPool , SCSI_REQUEST_BLOCK_SIZE );
1167
- #endif
1168
1166
1169
1167
if (srb == NULL ) {
1170
1168
@@ -1530,11 +1528,7 @@ Return Value:
1530
1528
// Determine if the device is writable.
1531
1529
//
1532
1530
1533
- #ifndef __REACTOS__
1534
1531
modeData = ExAllocatePool (NonPagedPoolNxCacheAligned , MODE_DATA_SIZE );
1535
- #else
1536
- modeData = ExAllocatePool (NonPagedPoolCacheAligned , MODE_DATA_SIZE );
1537
- #endif
1538
1532
1539
1533
if (modeData == NULL ) {
1540
1534
status = STATUS_INSUFFICIENT_RESOURCES ;
@@ -1845,20 +1839,12 @@ Return Value:
1845
1839
// Allocate a Srb for the read command.
1846
1840
//
1847
1841
1848
- #ifndef __REACTOS__
1849
1842
readData = ExAllocatePool (NonPagedPoolNx , geometry -> BytesPerSector );
1850
- #else
1851
- readData = ExAllocatePool (NonPagedPool , geometry -> BytesPerSector );
1852
- #endif
1853
1843
if (readData == NULL ) {
1854
1844
return STATUS_NO_MEMORY ;
1855
1845
}
1856
1846
1857
- #ifndef __REACTOS__
1858
1847
srb = ExAllocatePool (NonPagedPoolNx , SCSI_REQUEST_BLOCK_SIZE );
1859
- #else
1860
- srb = ExAllocatePool (NonPagedPool , SCSI_REQUEST_BLOCK_SIZE );
1861
- #endif
1862
1848
1863
1849
if (srb == NULL ) {
1864
1850
@@ -1948,11 +1934,7 @@ Return Value:
1948
1934
return (diskData -> DriveType );
1949
1935
}
1950
1936
1951
- #ifndef __REACTOS__
1952
1937
modeData = ExAllocatePool (NonPagedPoolNxCacheAligned , MODE_DATA_SIZE );
1953
- #else
1954
- modeData = ExAllocatePool (NonPagedPoolCacheAligned , MODE_DATA_SIZE );
1955
- #endif
1956
1938
1957
1939
if (modeData == NULL ) {
1958
1940
return (DRIVE_TYPE_NONE );
@@ -2217,11 +2199,7 @@ Return Value:
2217
2199
2218
2200
PAGED_CODE ();
2219
2201
2220
- #ifndef __REACTOS__
2221
2202
modeData = ExAllocatePool (NonPagedPoolNxCacheAligned , MODE_DATA_SIZE );
2222
- #else
2223
- modeData = ExAllocatePool (NonPagedPoolCacheAligned , MODE_DATA_SIZE );
2224
- #endif
2225
2203
2226
2204
if (modeData == NULL ) {
2227
2205
return (STATUS_INSUFFICIENT_RESOURCES );
@@ -2320,11 +2298,7 @@ Return Value:
2320
2298
// Allocate a Srb for the format command.
2321
2299
//
2322
2300
2323
- #ifndef __REACTOS__
2324
2301
srb = ExAllocatePool (NonPagedPoolNx , SCSI_REQUEST_BLOCK_SIZE );
2325
- #else
2326
- srb = ExAllocatePool (NonPagedPool , SCSI_REQUEST_BLOCK_SIZE );
2327
- #endif
2328
2302
2329
2303
if (srb == NULL ) {
2330
2304
@@ -2384,11 +2358,7 @@ Return Value:
2384
2358
// Allocate a Srb for the format command.
2385
2359
//
2386
2360
2387
- #ifndef __REACTOS__
2388
2361
srb = ExAllocatePool (NonPagedPoolNx , SCSI_REQUEST_BLOCK_SIZE );
2389
- #else
2390
- srb = ExAllocatePool (NonPagedPool , SCSI_REQUEST_BLOCK_SIZE );
2391
- #endif
2392
2362
2393
2363
if (srb == NULL ) {
2394
2364
return (STATUS_INSUFFICIENT_RESOURCES );
@@ -2514,13 +2484,8 @@ Return Value:
2514
2484
2515
2485
DebugPrint ((2 ,"Sending SCSIOP_START_STOP_UNIT\n" ));
2516
2486
2517
- #ifndef __REACTOS__
2518
2487
context = ExAllocatePool (NonPagedPoolNx ,
2519
2488
sizeof (COMPLETION_CONTEXT ));
2520
- #else
2521
- context = ExAllocatePool (NonPagedPool ,
2522
- sizeof (COMPLETION_CONTEXT ));
2523
- #endif
2524
2489
2525
2490
if (context == NULL ) {
2526
2491
@@ -2599,11 +2564,7 @@ Return Value:
2599
2564
context = NULL ;
2600
2565
2601
2566
if (!overFlow ) {
2602
- #ifndef __REACTOS__
2603
2567
context = ExAllocatePool (NonPagedPoolNx , sizeNeeded );
2604
- #else
2605
- context = ExAllocatePool (NonPagedPool , sizeNeeded );
2606
- #endif
2607
2568
}
2608
2569
2609
2570
if (context == NULL ) {
@@ -2765,11 +2726,7 @@ Return Value:
2765
2726
driveMediaConstants -> SectorsPerTrack *
2766
2727
driveMediaConstants -> BytesPerSector ;
2767
2728
2768
- #ifndef __REACTOS__
2769
2729
buffer = ExAllocatePool (NonPagedPoolNxCacheAligned , length );
2770
- #else
2771
- buffer = ExAllocatePool (NonPagedPoolCacheAligned , length );
2772
- #endif
2773
2730
2774
2731
if (buffer == NULL ) {
2775
2732
return (STATUS_INSUFFICIENT_RESOURCES );
@@ -3051,11 +3008,7 @@ Return Value:
3051
3008
3052
3009
// Allocate an SRB for the SCSIOP_READ_FORMATTED_CAPACITY request
3053
3010
//
3054
- #ifndef __REACTOS__
3055
3011
srb = ExAllocatePool (NonPagedPoolNx , SCSI_REQUEST_BLOCK_SIZE );
3056
- #else
3057
- srb = ExAllocatePool (NonPagedPool , SCSI_REQUEST_BLOCK_SIZE );
3058
- #endif
3059
3012
3060
3013
if (srb == NULL )
3061
3014
{
@@ -3071,11 +3024,7 @@ Return Value:
3071
3024
3072
3025
ASSERT (dataTransferLength < 0x100 );
3073
3026
3074
- #ifndef __REACTOS__
3075
3027
dataBuffer = ExAllocatePool (NonPagedPoolNx , dataTransferLength );
3076
- #else
3077
- dataBuffer = ExAllocatePool (NonPagedPool , dataTransferLength );
3078
- #endif
3079
3028
3080
3029
if (dataBuffer == NULL )
3081
3030
{
@@ -3425,11 +3374,7 @@ Return Value:
3425
3374
3426
3375
// Allocate an SRB for the SCSIOP_FORMAT_UNIT request
3427
3376
//
3428
- #ifndef __REACTOS__
3429
3377
srb = ExAllocatePool (NonPagedPoolNx , SCSI_REQUEST_BLOCK_SIZE );
3430
- #else
3431
- srb = ExAllocatePool (NonPagedPool , SCSI_REQUEST_BLOCK_SIZE );
3432
- #endif
3433
3378
3434
3379
if (srb == NULL )
3435
3380
{
@@ -3438,13 +3383,8 @@ Return Value:
3438
3383
3439
3384
// Allocate a transfer buffer for the SCSIOP_FORMAT_UNIT parameter list
3440
3385
//
3441
- #ifndef __REACTOS__
3442
3386
parameterList = ExAllocatePool (NonPagedPoolNx ,
3443
3387
sizeof (FORMAT_UNIT_PARAMETER_LIST ));
3444
- #else
3445
- parameterList = ExAllocatePool (NonPagedPool ,
3446
- sizeof (FORMAT_UNIT_PARAMETER_LIST ));
3447
- #endif
3448
3388
3449
3389
if (parameterList == NULL )
3450
3390
{
@@ -3573,4 +3513,3 @@ Return Value:
3573
3513
3574
3514
return status ;
3575
3515
}
3576
-
0 commit comments