Author: fireball
Date: Tue May 8 14:32:16 2007
New Revision: 26653
URL:
http://svn.reactos.org/svn/reactos?rev=26653&view=rev
Log:
- Fix unshielded "return"s inside PSEH blocks, in the kernel.
- Fix formatting of a couple of lines.
Modified:
trunk/reactos/ntoskrnl/ex/sysinfo.c
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
trunk/reactos/ntoskrnl/ob/oblife.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c Tue May 8 14:32:16 2007
@@ -720,7 +720,7 @@
if (Size < sizeof(SYSTEM_PROCESS_INFORMATION))
{
- return (STATUS_INFO_LENGTH_MISMATCH); // in case buffer size is too small
+ _SEH_YIELD(return STATUS_INFO_LENGTH_MISMATCH); // in case buffer size is too small
}
syspr = PsGetNextProcess(NULL);
@@ -735,7 +735,7 @@
int inLen=32; // image name len in bytes
PLIST_ENTRY current_entry;
PETHREAD current;
- PSYSTEM_THREAD_INFORMATION ThreadInfo;
+ PSYSTEM_THREAD_INFORMATION ThreadInfo;
SpiCur = (PSYSTEM_PROCESS_INFORMATION)pCur;
@@ -756,7 +756,7 @@
*ReqSize = ovlSize;
ObDereferenceObject(pr);
- return (STATUS_INFO_LENGTH_MISMATCH); // in case buffer size is too small
+ _SEH_YIELD(return STATUS_INFO_LENGTH_MISMATCH); // in case buffer size is too small
}
// fill system information
@@ -777,7 +777,7 @@
}
else
{
- RtlInitUnicodeString(&SpiCur->ImageName, NULL);
+ RtlInitUnicodeString(&SpiCur->ImageName, NULL);
}
SpiCur->BasePriority = pr->Pcb.BasePriority;
@@ -796,15 +796,14 @@
SpiCur->PagefileUsage = pr->QuotaUsage[2];
SpiCur->PeakPagefileUsage = pr->QuotaPeak[2];
SpiCur->PrivatePageCount = pr->CommitCharge;
- ThreadInfo = (PSYSTEM_THREAD_INFORMATION)(SpiCur + 1);
-
- current_entry = pr->ThreadListHead.Flink;
- while (current_entry != &pr->ThreadListHead)
+ ThreadInfo = (PSYSTEM_THREAD_INFORMATION)(SpiCur + 1);
+
+ current_entry = pr->ThreadListHead.Flink;
+ while (current_entry != &pr->ThreadListHead)
{
current = CONTAINING_RECORD(current_entry, ETHREAD,
ThreadListEntry);
-
ThreadInfo->KernelTime.QuadPart = current->Tcb.KernelTime * 100000LL;
ThreadInfo->UserTime.QuadPart = current->Tcb.UserTime * 100000LL;
// SpiCur->TH[i].CreateTime = current->CreateTime;
@@ -1828,7 +1827,7 @@
*/
if (SystemInformationClass >= MaxSystemInfoClass)
{
- return (STATUS_INVALID_INFO_CLASS);
+ _SEH_YIELD(return STATUS_INVALID_INFO_CLASS);
}
if (NULL != CallQS [SystemInformationClass].Query)
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c Tue May 8 14:32:16 2007
@@ -2800,7 +2800,7 @@
{
/* We failed */
ObDereferenceObject(FileObject);
- return STATUS_ACCESS_DENIED;
+ _SEH_YIELD(return STATUS_ACCESS_DENIED);
}
/* Probe the status block */
Modified: trunk/reactos/ntoskrnl/ob/oblife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/oblife.c (original)
+++ trunk/reactos/ntoskrnl/ob/oblife.c Tue May 8 14:32:16 2007
@@ -839,7 +839,10 @@
ALIGN_UP(ObjectType->Name.MaximumLength, ULONG);
/* Check if thats too much though. */
- if (Length < *ReturnLength) return STATUS_INFO_LENGTH_MISMATCH;
+ if (Length < *ReturnLength)
+ {
+ _SEH_YIELD(return STATUS_INFO_LENGTH_MISMATCH);
+ }
/* Build the data */
ObjectTypeInfo->TotalNumberOfHandles =