Skip to content

Commit 67a7e45

Browse files
gigaherzHeisSpiter
authored andcommitted
[CDFS_NEW] Address review comments:
- Don't define-out volatile. - Cleanup the ros-specific hdd-backed device object on shutdown. - Fix hdd-backed use. Required a rather ugly hack. - Update README.FSD
1 parent 6a3bbf2 commit 67a7e45

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

drivers/filesystems/cdfs_new/cdstruc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ typedef PVOID PBCB; //**** Bcb's are now part of the cache module
171171
#define BYTE_COUNT_EMBEDDED_NAME (32)
172172

173173
#ifdef __REACTOS__
174-
#define __volatile
174+
#define __volatile volatile
175175
#define _Unreferenced_parameter_
176176
#define __field_range(a,b)
177177
#define __analysis_assert(x)

drivers/filesystems/cdfs_new/deviosup.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,6 +2607,9 @@ Return Value:
26072607
// Make sure we don't try and read past end of the last track.
26082608
//
26092609

2610+
#ifdef __REACTOS__
2611+
if (Vcb->CdromToc) {
2612+
#endif
26102613
TrackData = &Vcb->CdromToc->TrackData[(Vcb->CdromToc->LastTrack - Vcb->CdromToc->FirstTrack + 1)];
26112614

26122615
SwapCopyUchar4( &EndBlock, &TrackData->Address );
@@ -2617,6 +2620,12 @@ Return Value:
26172620

26182621
Blocks = CD_SEC_CHUNK_BLOCKS;
26192622
}
2623+
#ifdef __REACTOS__
2624+
} else {
2625+
// HACK!!!!!!!! Might cause reads to overrun the end of the partition, no idea what consequences that can have.
2626+
Blocks = CD_SEC_CHUNK_BLOCKS;
2627+
}
2628+
#endif
26202629

26212630
if ((0 == Blocks) || (Lbn < 16)) {
26222631

drivers/filesystems/cdfs_new/fsctrl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,12 @@ Return Value:
10661066
//
10671067

10681068
if (!FlagOn( Vcb->VcbState, VCB_STATE_AUDIO_DISK) &&
1069+
#ifndef __REACTOS__
10691070
((Vcb->CdromToc->LastTrack - Vcb->CdromToc->FirstTrack) == 0)) {
1071+
#else
1072+
((FilesystemDeviceType == FILE_DEVICE_DISK_FILE_SYSTEM) ||
1073+
((Vcb->CdromToc->LastTrack - Vcb->CdromToc->FirstTrack) == 0))) {
1074+
#endif
10701075

10711076
ULONG Index;
10721077
PUCHAR Buffer;

drivers/filesystems/cdfs_new/shutdown.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ Return Value:
167167

168168
IoUnregisterFileSystem( CdData.FileSystemDeviceObject );
169169
IoDeleteDevice( CdData.FileSystemDeviceObject );
170+
#ifdef __REACTOS__
171+
IoUnregisterFileSystem( CdData.HddFileSystemDeviceObject );
172+
IoDeleteDevice( CdData.HddFileSystemDeviceObject );
173+
#endif
170174

171175
CdCompleteRequest( IrpContext, Irp, STATUS_SUCCESS );
172176
return STATUS_SUCCESS;

media/doc/README.FSD

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ The following FSD are shared with: http://www.acc.umu.se/~bosse/
1616
reactos/drivers/filesystems/ffs # Synced to 0.5.2
1717
reactos/drivers/filesystems/reiserfs # Synced to 0.26
1818

19-
The following FSD are shared with: https://github.com/Microsoft/Windows-driver-samples.
20-
reactos/drivers/filesystems/fastfat_new # Synced to 2817004
19+
The following FSD are shared with: https://github.com/Microsoft/Windows-driver-samples
20+
21+
reactos/drivers/filesystems/fastfat_new # Synced to 2817004
22+
reactos/drivers/filesystems/cdfs_new # Synced to 2817004

0 commit comments

Comments
 (0)