Author: sginsberg
Date: Tue Dec 23 11:43:25 2008
New Revision: 38302
URL:
http://svn.reactos.org/svn/reactos?rev=38302&view=rev
Log:
- Silence ext2 FSD warnings. Also fix some bugs where the return status wasn't
properly set.
- 'allowwarnings=true' -- not anymore
Modified:
trunk/reactos/drivers/filesystems/ext2/ext2.rbuild
trunk/reactos/drivers/filesystems/ext2/inc/protos.h
trunk/reactos/drivers/filesystems/ext2/inc/struct.h
trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c
trunk/reactos/drivers/filesystems/ext2/src/cleanup.c
trunk/reactos/drivers/filesystems/ext2/src/close.c
trunk/reactos/drivers/filesystems/ext2/src/create.c
trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c
trunk/reactos/drivers/filesystems/ext2/src/ext2init.c
trunk/reactos/drivers/filesystems/ext2/src/fastio.c
trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c
trunk/reactos/drivers/filesystems/ext2/src/flush.c
trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c
trunk/reactos/drivers/filesystems/ext2/src/io.c
trunk/reactos/drivers/filesystems/ext2/src/metadata.c
trunk/reactos/drivers/filesystems/ext2/src/misc.c
trunk/reactos/drivers/filesystems/ext2/src/read.c
trunk/reactos/drivers/filesystems/ext2/src/write.c
Modified: trunk/reactos/drivers/filesystems/ext2/ext2.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/e…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/ext2.rbuild [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/ext2.rbuild [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="ext2fs" type="kernelmodedriver"
installbase="system32/drivers" installname="ext2.sys"
allowwarnings="true">
+<module name="ext2fs" type="kernelmodedriver"
installbase="system32/drivers" installname="ext2.sys">
<bootstrap installbase="$(CDOUTPUT)" />
<include base="ext2fs">inc</include>
<library>ntoskrnl</library>
Modified: trunk/reactos/drivers/filesystems/ext2/inc/protos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/i…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/inc/protos.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/inc/protos.h [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -548,7 +548,7 @@
extern BOOLEAN NTAPI Ext2FastIoUnlockAllByKey(
IN PFILE_OBJECT FileObject,
-PEPROCESS ProcessId,
+PVOID ProcessId,
ULONG Key,
OUT PIO_STATUS_BLOCK IoStatus,
IN PDEVICE_OBJECT DeviceObject);
Modified: trunk/reactos/drivers/filesystems/ext2/inc/struct.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/i…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/inc/struct.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/inc/struct.h [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -35,6 +35,7 @@
#define except(x) if (0 && (x))
#define finally if (1)
#define GetExceptionInformation() 0
+#define GetExceptionCode() 0
// we will use the LARGE_INTEGER structure as defined by NT
Modified: trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/DiskIO.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -168,7 +168,7 @@
{
DebugTrace(DEBUG_TRACE_MISC, " !!!! Unable to create an IRP", 0 );
Status = STATUS_INSUFFICIENT_RESOURCES;
- try_return( Status );
+ try_return();
}
//
Modified: trunk/reactos/drivers/filesystems/ext2/src/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/cleanup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/cleanup.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -140,7 +140,7 @@
{
DebugTrace( DEBUG_TRACE_FILE_OBJ, "###### File Pointer 0x%LX [Cleanup]",
PtrFileObject);
}
- try_return( RC );
+ try_return();
}
@@ -345,7 +345,7 @@
CompleteIrp = TRUE;
}
- try_return( RC );
+ try_return();
try_exit: NOTHING;
Modified: trunk/reactos/drivers/filesystems/ext2/src/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/close.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/close.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -142,7 +142,7 @@
{
DebugTrace( DEBUG_TRACE_SPECIAL, "###### File Pointer 0x%LX [Close]",
PtrFileObject);
}
- try_return( RC );
+ try_return();
}
// Get the FCB and CCB pointers
@@ -400,7 +400,7 @@
DebugTrace(DEBUG_TRACE_MISC, "VCB Close Requested !!!", 0);
CompleteIrp = TRUE;
}
- try_return( RC );
+ try_return();
try_exit: NOTHING;
Modified: trunk/reactos/drivers/filesystems/ext2/src/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/create.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -180,6 +180,9 @@
UNICODE_STRING AbsolutePathName;
UNICODE_STRING RenameLinkTargetFileName;
+ /* Silence GCC warnings */
+ RtlZeroMemory(&RelatedObjectName, sizeof(UNICODE_STRING));
+
ASSERT(PtrIrpContext);
ASSERT(PtrIrp);
@@ -200,7 +203,7 @@
// Asynchronous processing required...
RC = Ext2PostRequest(PtrIrpContext, PtrIrp);
DeferredProcessing = TRUE;
- try_return(RC);
+ try_return();
}
// Obtaining the parameters specified by the user.
@@ -259,7 +262,7 @@
if (PtrIrp->Overlay.AllocationSize.HighPart)
{
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
// Getting a pointer to the supplied security context
@@ -324,7 +327,7 @@
// Verify Volume...
// if (!NT_SUCCESS(RC = Ext2VerifyVolume(PtrVCB)))
// {
- // try_return(RC);
+ // try_return();
// }
// If the volume has been locked, fail the request
@@ -333,7 +336,7 @@
{
DebugTrace(DEBUG_TRACE_MISC, "Volume locked. Failing Create", 0 );
RC = STATUS_ACCESS_DENIED;
- try_return(RC);
+ try_return();
}
@@ -348,34 +351,34 @@
if ((OpenTargetDirectory) || (PtrExtAttrBuffer))
{
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
if (DirectoryOnlyRequested)
{
// a volume is not a directory
RC = STATUS_NOT_A_DIRECTORY;
- try_return(RC);
+ try_return();
}
if ((RequestedDisposition != FILE_OPEN) && (RequestedDisposition !=
FILE_OPEN_IF))
{
// cannot create a new volume, I'm afraid ...
RC = STATUS_ACCESS_DENIED;
- try_return(RC);
+ try_return();
}
DebugTrace(DEBUG_TRACE_MISC, "Volume open requested", 0 );
RC = Ext2OpenVolume(PtrVCB, PtrIrpContext, PtrIrp, ShareAccess, PtrSecurityContext,
PtrNewFileObject);
ReturnedInformation = PtrIrp->IoStatus.Information;
- try_return(RC);
+ try_return();
}
if (OpenByFileId)
{
DebugTrace(DEBUG_TRACE_MISC, "Open by File Id requested", 0 );
RC = STATUS_ACCESS_DENIED;
- try_return(RC);
+ try_return();
}
// Relative path name specified...
@@ -386,20 +389,20 @@
{
// we must have a directory as the "related" object
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
// Performing validity checks...
if ((RelatedObjectName.Length == 0) || (RelatedObjectName.Buffer[0] != L'\\'))
{
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
if ((TargetObjectName.Length != 0) && (TargetObjectName.Buffer[0] ==
L'\\'))
{
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
// Creating an absolute path-name.
@@ -408,7 +411,7 @@
if (!(AbsolutePathName.Buffer = Ext2AllocatePool(PagedPool,
AbsolutePathName.MaximumLength )))
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
RtlZeroMemory(AbsolutePathName.Buffer, AbsolutePathName.MaximumLength);
@@ -429,14 +432,14 @@
if (TargetObjectName.Buffer[0] != L'\\')
{
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
{
AbsolutePathName.MaximumLength = TargetObjectName.Length;
if (!(AbsolutePathName.Buffer = Ext2AllocatePool(PagedPool,
AbsolutePathName.MaximumLength ))) {
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
RtlZeroMemory(AbsolutePathName.Buffer, AbsolutePathName.MaximumLength);
@@ -456,12 +459,12 @@
(RequestedDisposition == FILE_OVERWRITE_IF))
{
RC = STATUS_FILE_IS_A_DIRECTORY;
- try_return(RC);
+ try_return();
}
RC = Ext2OpenRootDirectory(PtrVCB, PtrIrpContext, PtrIrp, ShareAccess,
PtrSecurityContext, PtrNewFileObject);
DebugTrace(DEBUG_TRACE_MISC, " === Root directory opened", 0 );
- try_return(RC);
+ try_return();
}
@@ -562,7 +565,7 @@
// Can have only a directory in the middle of the path...
//
RC = STATUS_OBJECT_PATH_NOT_FOUND;
- try_return( RC );
+ try_return();
}
}
else // searching on the disk...
@@ -600,7 +603,7 @@
if( !CurrInodeNo )
{
RC = STATUS_OBJECT_PATH_NOT_FOUND;
- try_return( RC );
+ try_return();
}
// Set the allocation size for the object is specified
//IoSetShareAccess(DesiredAccess, ShareAccess, PtrNewFileObject,
&(PtrNewFCB->FCBShareAccess));
@@ -647,7 +650,7 @@
else
{
RC = STATUS_OBJECT_PATH_NOT_FOUND;
- try_return( RC );
+ try_return();
}
}
@@ -660,7 +663,7 @@
// Can have only a directory in the middle of the path...
//
RC = STATUS_OBJECT_PATH_NOT_FOUND;
- try_return( RC );
+ try_return();
}
PtrCurrFileObject = NULL;
@@ -681,7 +684,7 @@
{
ReturnedInformation = FILE_EXISTS;
RC = STATUS_OBJECT_NAME_COLLISION;
- try_return(RC);
+ try_return();
}
// Is this the type of file I was looking for?
@@ -692,18 +695,18 @@
// Deny access!
// Cannot open a special file...
RC = STATUS_ACCESS_DENIED;
- try_return( RC );
+ try_return();
}
if( DirectoryOnlyRequested && Type != EXT2_FT_DIR )
{
RC = STATUS_NOT_A_DIRECTORY;
- try_return( RC );
+ try_return();
}
if( FileOnlyRequested && Type == EXT2_FT_DIR )
{
RC = STATUS_FILE_IS_A_DIRECTORY;
- try_return(RC);
+ try_return();
}
PtrCurrFileObject = PtrNewFileObject;
@@ -733,7 +736,7 @@
PtrObjectName ) ) )
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
if( Type == EXT2_FT_DIR )
@@ -781,7 +784,7 @@
(RequestedDisposition == FILE_OVERWRITE) || (RequestedDisposition ==
FILE_OVERWRITE_IF )))
{
RC = STATUS_FILE_IS_A_DIRECTORY;
- try_return(RC);
+ try_return();
}
@@ -798,7 +801,7 @@
&(PtrNewFCB->FCBShareAccess), TRUE)))
{
// Ext2CloseCCB(PtrNewCCB);
- try_return(RC);
+ try_return();
}
}
else
@@ -1008,7 +1011,7 @@
if (!(PtrCCB = Ext2AllocateCCB()))
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
// initialize the CCB
Modified: trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/dircntrl.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -429,7 +429,7 @@
{
// Read Failure
DebugTrace(DEBUG_TRACE_MISC, "Cache read failiure while reading in volume meta
data", 0);
- try_return( STATUS_ACCESS_DENIED );
+ try_return( RC = STATUS_ACCESS_DENIED );
}
else
{
@@ -694,11 +694,11 @@
case FileFullDirectoryInformation:
// FullDirInformation->
DebugTrace(DEBUG_TRACE_DIRINFO, " === FileFullDirectoryInformation - Not
handled", 0 );
- try_return( RC );
+ try_return();
case FileNamesInformation:
// NamesInformation->
DebugTrace(DEBUG_TRACE_DIRINFO, " === FileNamesInformation - Not
handled", 0 );
- try_return( RC );
+ try_return();
default:
DebugTrace(DEBUG_TRACE_DIRINFO, " === Invalid Dir Info class - Not
handled", 0 );
try_return( RC = STATUS_INVALID_INFO_CLASS );
@@ -719,7 +719,7 @@
RC = STATUS_NO_SUCH_FILE;
else
RC = STATUS_NO_MORE_FILES;
- try_return( RC );
+ try_return();
}
else if( BytesReturned )
{
Modified: trunk/reactos/drivers/filesystems/ext2/src/ext2init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/ext2init.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/ext2init.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -85,7 +85,7 @@
// in your commercial driver implementation, it would be
// advisable for your driver to print an appropriate error
// message to the system error log before leaving
- // try_return(RC);
+ // try_return();
// }
// we should have the registry data (if any), allocate zone memory ...
@@ -98,7 +98,7 @@
if (!NT_SUCCESS(RC = Ext2InitializeZones()))
{
// we failed, print a message and leave ...
- try_return(RC);
+ try_return();
}
#endif
@@ -143,7 +143,7 @@
&(Ext2GlobalData.Ext2DeviceObject))))
{
// failed to create a device object, leave ...
- try_return(RC);
+ try_return();
}
Modified: trunk/reactos/drivers/filesystems/ext2/src/fastio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/fastio.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/fastio.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -593,7 +593,7 @@
*************************************************************************/
BOOLEAN NTAPI Ext2FastIoUnlockAllByKey(
IN PFILE_OBJECT FileObject,
-PEPROCESS ProcessId,
+PVOID ProcessId,
ULONG Key,
OUT PIO_STATUS_BLOCK IoStatus,
IN PDEVICE_OBJECT DeviceObject)
Modified: trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/fileinfo.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -144,7 +144,7 @@
{
// This is not allowed. Caller must use get/set volume information instead.
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
// ASSERT(PtrFCB->NodeIdentifier.NodeType == EXT2_NODE_TYPE_FCB);
@@ -205,14 +205,14 @@
DebugTrace(DEBUG_TRACE_FILEINFO, "FileNetworkOpenInformation requested for
%S", PtrFCB->FCBName->ObjectName.Buffer );
RC = Ext2GetNetworkOpenInformation(PtrFCB,
(PFILE_NETWORK_OPEN_INFORMATION)PtrSystemBuffer, &BufferLength);
// RC = STATUS_INVALID_PARAMETER;
- // try_return(RC);
+ // try_return();
break;
#endif // _WIN32_WINNT >= 0x0400
case FileInternalInformation:
DebugTrace(DEBUG_TRACE_FILEINFO, "FileInternalInformation requested for
%S", PtrFCB->FCBName->ObjectName.Buffer );
// RC = Ext2GetInternalInformation(...);
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
break;
case FileEaInformation:
DebugTrace(DEBUG_TRACE_FILEINFO, "FileEaInformation requested for %S",
PtrFCB->FCBName->ObjectName.Buffer );
@@ -246,7 +246,7 @@
// RC = Ext2GetFileStreamInformation(...);
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
break;
case FileAllInformation:
@@ -274,11 +274,11 @@
if (!NT_SUCCESS(RC = Ext2GetBasicInformation(PtrFCB,
(PFILE_BASIC_INFORMATION)&(PtrAllInfo->BasicInformation),
&BufferLength)))
{
- try_return(RC);
+ try_return();
}
if (!NT_SUCCESS(RC = Ext2GetStandardInformation(PtrFCB,
&(PtrAllInfo->StandardInformation), &BufferLength)))
{
- try_return(RC);
+ try_return();
}
// Similarly, get all of the others ...
}
@@ -291,19 +291,19 @@
case FileAlternateNameInformation:
DebugTrace(DEBUG_TRACE_FILEINFO, "FileAlternateNameInformation requested for
%S", PtrFCB->FCBName->ObjectName.Buffer );
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
// RC = Ext2GetAltNameInformation(...);
break;
case FileCompressionInformation:
DebugTrace(DEBUG_TRACE_FILEINFO, "FileCompressionInformation requested for
%S", PtrFCB->FCBName->ObjectName.Buffer );
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
// RC = Ext2GetCompressionInformation(...);
break;
default:
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
// If we completed successfully, the return the amount of information transferred.
@@ -409,7 +409,7 @@
DebugTrace(DEBUG_TRACE_FILEINFO, "Attempt to set FileEndOfFileInformation for
%S", PtrFCB->FCBName->ObjectName.Buffer );
// RC = Ext2SetEOF(...);
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
break;
case FilePositionInformation:
@@ -449,7 +449,7 @@
case FileLinkInformation:
DebugTrace(DEBUG_TRACE_FILEINFO, "Attempt to set FileLinkInformation for
%S", PtrFCB->FCBName->ObjectName.Buffer );
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
// When you implement your rename/link routine, be careful to
// check the following two arguments:
// TargetFileObject = PtrIoStackLocation->Parameters.SetFile.FileObject;
@@ -484,7 +484,7 @@
default:
DebugTrace(DEBUG_TRACE_FILEINFO, "Unrecoganised SetFileInformation code for
%S", PtrFCB->FCBName->ObjectName.Buffer );
RC = STATUS_INVALID_PARAMETER;
- try_return(RC);
+ try_return();
}
}
@@ -934,7 +934,7 @@
// "un-delete" the file.
Ext2ClearFlag(PtrFCB->FCBFlags, EXT2_FCB_DELETE_ON_CLOSE);
PtrFileObject->DeletePending = FALSE;
- try_return(RC);
+ try_return();
}
// Do some checking to see if the file can even be deleted.
@@ -942,7 +942,7 @@
if (PtrFCB->FCBFlags & EXT2_FCB_DELETE_ON_CLOSE)
{
// All done!
- try_return(RC);
+ try_return();
}
if (PtrFCB->FCBFlags & EXT2_FCB_READ_ONLY)
Modified: trunk/reactos/drivers/filesystems/ext2/src/flush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/flush.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/flush.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -138,7 +138,7 @@
// If we cannot wait, post the request immediately since a flush is inherently
blocking/synchronous.
if (!CanWait) {
PostRequest = TRUE;
- try_return(RC);
+ try_return();
}
// Check the type of object passed-in. That will determine the course of
@@ -160,7 +160,7 @@
Ext2FlushLogicalVolume(PtrIrpContext, PtrIrp, PtrVCB);
- try_return(RC);
+ try_return();
}
if (!(PtrFCB->FCBFlags & EXT2_FCB_DIRECTORY))
Modified: trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -221,8 +221,6 @@
PEXT2_GROUP_DESCRIPTOR PtrGroupDescriptor = NULL;
- PEXT2_INODE PtrInode = NULL;
-
// Inititalising variables
PtrVPB = IrpSp->Parameters.MountVolume.Vpb;
@@ -257,7 +255,7 @@
DebugTrace(DEBUG_TRACE_MOUNT, "OEM[%s]", BootSector->Oem);
if (BootSector->Oem[0])
{
- try_return (STATUS_WRONG_VOLUME);
+ try_return (Status = STATUS_WRONG_VOLUME);
}
// Allocating memory for reading in Super Block...
@@ -299,7 +297,7 @@
(PDEVICE_OBJECT *)&PtrVolumeDeviceObject)) // The Volume Device
Object
)
{
- try_return( Status );
+ try_return();
}
//
@@ -444,7 +442,7 @@
PtrRootFileObject = IoCreateStreamFileObject(NULL, TargetDeviceObject );
if( !PtrRootFileObject )
{
- try_return( Status );
+ try_return();
}
//
// Associate the file stream with the Volume parameter block...
@@ -473,7 +471,7 @@
PtrVCB,
PtrObjectName ) ) )
{
- try_return( Status );
+ try_return();
}
Modified: trunk/reactos/drivers/filesystems/ext2/src/io.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/io.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/io.c [iso-8859-1] Tue Dec 23 11:43:25 2008
@@ -76,7 +76,7 @@
if ( !PtrSyncEvent )
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return ( RC );
+ try_return();
}
KeInitializeEvent( PtrSyncEvent, SynchronizationEvent, FALSE );
}
@@ -87,7 +87,7 @@
if ( !PtrIoContext )
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return ( RC );
+ try_return();
}
RtlZeroMemory( PtrIoContext, sizeof(EXT2_IO_CONTEXT) );
@@ -198,13 +198,13 @@
KeWaitForSingleObject( PtrSyncEvent,
Executive, KernelMode, FALSE, (PLARGE_INTEGER)NULL );
DbgPrint("DEADLY WAIT DONE\n");
- try_return ( RC );
+ try_return();
}
else
{
// Asynchronous IO...
RC = STATUS_PENDING;
- try_return ( RC );
+ try_return();
}
try_exit: NOTHING;
@@ -259,7 +259,7 @@
if ( !PtrSyncEvent )
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return ( RC );
+ try_return();
}
KeInitializeEvent( PtrSyncEvent, SynchronizationEvent, FALSE );
}
@@ -271,7 +271,7 @@
if ( !PtrIoContext )
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return ( RC );
+ try_return();
}
RtlZeroMemory( PtrIoContext, sizeof(EXT2_IO_CONTEXT) );
Modified: trunk/reactos/drivers/filesystems/ext2/src/metadata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/metadata.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/metadata.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -83,7 +83,7 @@
DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Invalid Inode no.
Group no %d - too big", GroupNo );
DebugTrace(DEBUG_TRACE_MISC, "Only %d groups available on disk",
PtrVcb->NoOfGroups );
RC = STATUS_UNSUCCESSFUL;
- try_return( RC );
+ try_return();
}
//if( PtrVcb->InodeTableBlock[ GroupNo ] == 0 )
@@ -91,7 +91,7 @@
{
DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Inode Table Group
Invalid - Group no %d ", GroupNo );
RC = STATUS_UNSUCCESSFUL;
- try_return( RC );
+ try_return();
}
// Inode numbers start at 1 and not from 0
@@ -135,7 +135,7 @@
(PVOID*)&PtrPinnedReadBuffer ))
{
RC = STATUS_UNSUCCESSFUL;
- try_return( RC );
+ try_return();
}
else
{
@@ -736,14 +736,14 @@
DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Invalid Inode no.
Group no %d - too big", GroupNo );
DebugTrace(DEBUG_TRACE_MISC, "Only %d groups available on disk",
PtrVcb->NoOfGroups );
RC = STATUS_UNSUCCESSFUL;
- try_return( RC );
+ try_return();
}
if( PtrVcb->PtrGroupDescriptors[ GroupNo ].InodeTablesBlock == 0 )
{
DebugTrace(DEBUG_TRACE_MISC, "&&&&&& Inode Table Group
Invalid - Group no %d ", GroupNo );
RC = STATUS_UNSUCCESSFUL;
- try_return( RC );
+ try_return();
}
Index = ( InodeNo - 1 ) - ( GroupNo * PtrVcb->InodesPerGroup );
@@ -781,7 +781,7 @@
(PVOID*)&PtrPinnedBuffer ) )
{
RC = STATUS_UNSUCCESSFUL;
- try_return( RC );
+ try_return();
}
else
{
Modified: trunk/reactos/drivers/filesystems/ext2/src/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/misc.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -92,27 +92,27 @@
// allocate memory for each of the zones and initialize the zones ...
if (!(Ext2GlobalData.ObjectNameZone = Ext2AllocatePool(NonPagedPool,
SizeOfObjectNameZone ))) {
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
if (!(Ext2GlobalData.CCBZone = Ext2AllocatePool(NonPagedPool, SizeOfCCBZone ))) {
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
if (!(Ext2GlobalData.FCBZone = Ext2AllocatePool(NonPagedPool, SizeOfFCBZone ))) {
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
if (!(Ext2GlobalData.ByteLockZone = Ext2AllocatePool(NonPagedPool, SizeOfByteLockZone
))) {
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
if (!(Ext2GlobalData.IrpContextZone = Ext2AllocatePool(NonPagedPool,
SizeOfIrpContextZone ))) {
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
// initialize each of the zone headers ...
@@ -120,7 +120,7 @@
Ext2QuadAlign(sizeof(Ext2ObjectName)),
Ext2GlobalData.ObjectNameZone, SizeOfObjectNameZone))) {
// failed the initialization, leave ...
- try_return(RC);
+ try_return();
}
if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.CCBZoneHeader),
@@ -128,7 +128,7 @@
Ext2GlobalData.CCBZone,
SizeOfCCBZone))) {
// failed the initialization, leave ...
- try_return(RC);
+ try_return();
}
if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.FCBZoneHeader),
@@ -136,7 +136,7 @@
Ext2GlobalData.FCBZone,
SizeOfFCBZone))) {
// failed the initialization, leave ...
- try_return(RC);
+ try_return();
}
if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.ByteLockZoneHeader),
@@ -144,7 +144,7 @@
Ext2GlobalData.ByteLockZone,
SizeOfByteLockZone))) {
// failed the initialization, leave ...
- try_return(RC);
+ try_return();
}
if (!NT_SUCCESS(RC = ExInitializeZone(&(Ext2GlobalData.IrpContextZoneHeader),
@@ -152,7 +152,7 @@
Ext2GlobalData.IrpContextZone,
SizeOfIrpContextZone))) {
// failed the initialization, leave ...
- try_return(RC);
+ try_return();
}
try_exit: NOTHING;
Modified: trunk/reactos/drivers/filesystems/ext2/src/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/read.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/read.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -255,7 +255,7 @@
if (ReadLength == 0)
{
// a 0 byte read can be immediately succeeded
- try_return(RC);
+ try_return();
}
// Is this a read of the volume itself ?
@@ -320,7 +320,7 @@
{
RC = STATUS_END_OF_FILE;
NumberBytesRead = 0;
- try_return( RC );
+ try_return();
}
}
if( PagingIo || NonBufferedIo )
@@ -332,7 +332,7 @@
PtrIrpContext, PtrIrp, PtrVCB,
ByteOffset, ReadLength, SynchronousIo);
- try_return(RC);
+ try_return();
}
else
{
@@ -357,7 +357,7 @@
RC = STATUS_UNSUCCESSFUL;
NumberBytesRead = 0;
- try_return( RC );
+ try_return();
}
else
{
@@ -367,7 +367,7 @@
PtrBCB = NULL;
RC = STATUS_SUCCESS;
NumberBytesRead = ReadLength;
- try_return(RC);
+ try_return();
}
}
@@ -400,7 +400,7 @@
if ( ( PtrFCB->FCBFlags & EXT2_FCB_DIRECTORY ) && !PagingIo )
{
RC = STATUS_INVALID_DEVICE_REQUEST;
- try_return(RC);
+ try_return();
}
PtrReqdFCB = &(PtrFCB->NTRequiredFCB);
@@ -448,7 +448,7 @@
// If the flush failed, return error to the caller
if (!NT_SUCCESS(RC = PtrIrp->IoStatus.Status))
{
- try_return(RC);
+ try_return();
}
}
}
@@ -573,7 +573,7 @@
NumberBytesRead = PtrIrp->IoStatus.Information;
RC = PtrIrp->IoStatus.Status;
- try_return(RC);
+ try_return();
}
// This is a regular run-of-the-mill cached I/O request. Let the
@@ -593,13 +593,13 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
}
// We have the data
RC = PtrIrp->IoStatus.Status;
NumberBytesRead = PtrIrp->IoStatus.Information;
- try_return(RC);
+ try_return();
}
else // NonBuffered or Paged IO
{
@@ -693,7 +693,7 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume
meta data - Retrying", 0);
}
}
@@ -732,7 +732,7 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume
meta data - Retrying", 0);
}
@@ -839,7 +839,7 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume
meta data - Retrying", 0);
}
@@ -1146,7 +1146,7 @@
{
CompleteIrp = FALSE;
}
- try_return( RC );
+ try_return();
}
try_exit: NOTHING;
@@ -1374,7 +1374,7 @@
if (!(PtrMdl = IoAllocateMdl(PtrIrp->UserBuffer, Length, FALSE, FALSE, PtrIrp)))
{
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return(RC);
+ try_return();
}
// Probe and lock the pages described by the MDL
Modified: trunk/reactos/drivers/filesystems/ext2/src/write.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/ext2/src/write.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ext2/src/write.c [iso-8859-1] Tue Dec 23 11:43:25
2008
@@ -241,7 +241,7 @@
if (WriteLength == 0)
{
// a 0 byte write can be immediately succeeded
- try_return(RC);
+ try_return();
}
// Is this a write of the volume itself ?
@@ -310,14 +310,14 @@
//
RC = STATUS_END_OF_FILE;
NumberBytesWritten = 0;
- try_return( RC );
+ try_return();
}
}
// Lock the callers buffer
if (!NT_SUCCESS(RC = Ext2LockCallersBuffer(PtrIrp, TRUE, WriteLength)))
{
- try_return(RC);
+ try_return();
}
// Forward the request to the lower level driver
@@ -337,7 +337,7 @@
PtrIrpContext, PtrIrp, PtrVCB,
ByteOffset, WriteLength, SynchronousIo );
- try_return(RC);
+ try_return();
}
else
{
@@ -375,7 +375,7 @@
// Go ahead and complete the IRP...
}
- try_return(RC);
+ try_return();
}
@@ -433,7 +433,7 @@
// Nope... User initiated directory writes are not allowed!
// Fail this request...
RC = STATUS_INVALID_DEVICE_REQUEST;
- try_return(RC);
+ try_return();
}
}
@@ -496,7 +496,7 @@
// If the flush failed, return error to the caller
if (!NT_SUCCESS(RC = PtrIrp->IoStatus.Status))
{
- try_return(RC);
+ try_return();
}
// Attempt the purge and ignore the return code
@@ -555,7 +555,7 @@
// Page request for writing outside the file...
// No op this IRP by completing it...
//
- try_return(RC);
+ try_return();
}
if( ByteOffset.QuadPart + WriteLength
PtrReqdFCB->CommonFCBHeader.AllocationSize.QuadPart
)
@@ -688,7 +688,7 @@
NumberBytesWritten = PtrIrp->IoStatus.Information;
RC = PtrIrp->IoStatus.Status;
- try_return(RC);
+ try_return();
}
// This is a regular run-of-the-mill cached I/O request. Let the
@@ -781,7 +781,7 @@
Ext2DeallocateUnicodeString( &ErrorMessage );
RC = STATUS_INSUFFICIENT_RESOURCES;
- try_return ( RC );
+ try_return();
}
if( ( ByteOffset.QuadPart + WriteLength ) > DirectBlockSize &&
@@ -813,7 +813,7 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume
meta data", 0);
}
}
@@ -852,7 +852,7 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume
meta data - Retrying", 0);
}
@@ -944,7 +944,7 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume
meta data - Retrying", 0);
}
@@ -1055,7 +1055,7 @@
// Mark Irp Pending ...
IoMarkIrpPending( PtrIrp );
RC = STATUS_PENDING;
- try_return(RC);
+ try_return();
DebugTrace(DEBUG_TRACE_ASYNC, "Cache read failiure while reading in volume
meta data - Retrying", 0);
}
@@ -1324,7 +1324,7 @@
{
CompleteIrp = FALSE;
}
- try_return( RC );
+ try_return();
}
try_exit: NOTHING;