Author: tkreuzer
Date: Fri May 4 11:32:07 2012
New Revision: 56491
URL: http://svn.reactos.org/svn/reactos?rev=56491&view=rev
Log:
[NTOSKRNL]
- Fix amd64 build
- Fix some MSVC/amd64 warnings
Modified:
trunk/reactos/ntoskrnl/cache/section/data.c
trunk/reactos/ntoskrnl/mm/ARM3/section.c
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
trunk/reactos/ntoskrnl/mm/rmap.c
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/cache/section/data.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/dat…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] Fri May 4 11:32:07 2012
@@ -869,7 +869,7 @@
MmLockSectionSegment(Segment);
Segment->RawLength.QuadPart = NewSize->QuadPart;
Segment->Length.QuadPart = MAX(Segment->Length.QuadPart,
- PAGE_ROUND_UP(Segment->RawLength.LowPart));
+ (LONG64)PAGE_ROUND_UP(Segment->RawLength.QuadPart));
MmUnlockSectionSegment(Segment);
return STATUS_SUCCESS;
}
Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Fri May 4 11:32:07 2012
@@ -1738,12 +1738,16 @@
/* Was the PDE invalid */
if (PointerPde->u.Long == 0)
{
+#if (_MI_PAGING_LEVELS == 2)
/* Find the system double-mapped PDE that describes this mapping */
SystemMapPde = &MmSystemPagePtes[((ULONG_PTR)PointerPde & (SYSTEM_PD_SIZE - 1)) / sizeof(MMPTE)];
/* Make it valid */
ASSERT(SystemMapPde->u.Hard.Valid == 1);
MI_WRITE_VALID_PDE(PointerPde, *SystemMapPde);
+#else
+ ASSERT(FALSE);
+#endif
}
/* Dereference the PDE and the PTE */
@@ -1791,7 +1795,8 @@
IN PVOID Base,
OUT PCONTROL_AREA *ControlArea)
{
- ULONG Hash, Size, Count = 0, Entry;
+ ULONG Hash, Size, Count = 0;
+ ULONG_PTR Entry;
PAGED_CODE();
/* Compute the hash for this entry and loop trying to find it */
@@ -1846,7 +1851,7 @@
/* Clear the bits for this mapping */
RtlClearBits(Session->SystemSpaceBitMap,
- ((ULONG_PTR)MappedBase - (ULONG_PTR)Session->SystemSpaceViewStart) >> 16,
+ (ULONG)(((ULONG_PTR)MappedBase - (ULONG_PTR)Session->SystemSpaceViewStart) >> 16),
Size);
/* Convert the size from a bit size into the actual size */
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Fri May 4 11:32:07 2012
@@ -3579,7 +3579,7 @@
//
PointerPte = MI_GET_PROTOTYPE_PTE_FOR_VPN(FoundVad, StartingAddress >> PAGE_SHIFT);
LastPte = MI_GET_PROTOTYPE_PTE_FOR_VPN(FoundVad, EndingAddress >> PAGE_SHIFT);
- QuotaCharge = LastPte - PointerPte + 1;
+ QuotaCharge = (ULONG)(LastPte - PointerPte + 1);
KeAcquireGuardedMutexUnsafe(&MmSectionCommitMutex);
//
Modified: trunk/reactos/ntoskrnl/mm/rmap.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/rmap.c?rev=564…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] Fri May 4 11:32:07 2012
@@ -125,7 +125,7 @@
Type = MemoryArea->Type;
if (Type == MEMORY_AREA_SECTION_VIEW)
{
- ULONG Entry;
+ ULONG_PTR Entry;
Offset = MemoryArea->Data.SectionData.ViewOffset.QuadPart +
((ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress);
@@ -134,8 +134,8 @@
/*
* Get or create a pageop
*/
- Entry = MmGetPageEntrySectionSegment
- (MemoryArea->Data.SectionData.Segment, (PLARGE_INTEGER)&Offset);
+ Entry = MmGetPageEntrySectionSegment(MemoryArea->Data.SectionData.Segment,
+ (PLARGE_INTEGER)&Offset);
if (Entry && IS_SWAP_FROM_SSE(Entry) && SWAPENTRY_FROM_SSE(Entry) == MM_WAIT_ENTRY)
{
MmUnlockSectionSegment(MemoryArea->Data.SectionData.Segment);
@@ -430,7 +430,7 @@
where n is between 0 and 255. When such an rmap exists, it specifies a
segment rmap in which the process part is a pointer to a slice of a section
page table, and the low 8 bits of the address represent a page index in the
-page table slice. Together, this information is used by
+page table slice. Together, this information is used by
MmGetSectionAssociation to determine which page entry points to this page in
the segment page table.
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Fri May 4 11:32:07 2012
@@ -1163,7 +1163,7 @@
NTSTATUS
NTAPI
MiReadPage(PMEMORY_AREA MemoryArea,
- ULONG SegOffset,
+ ULONG_PTR SegOffset,
PPFN_NUMBER Page)
/*
* FUNCTION: Read a page for a section backed memory area.
@@ -1685,7 +1685,7 @@
*/
MmLockSectionSegment(Segment);
Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
-
+
/*
* Wait for any other operations to complete
*/
@@ -2418,7 +2418,7 @@
+ MemoryArea->Data.SectionData.ViewOffset.QuadPart;
Entry = MmGetPageEntrySectionSegment(Segment, &Offset);
/*
- * An MM_WAIT_ENTRY is ok in this case... It'll just count as
+ * An MM_WAIT_ENTRY is ok in this case... It'll just count as
* IS_SWAP_FROM_SSE and we'll do the right thing.
*/
Page = MmGetPfnForProcess(Process, Address);
Author: tfaber
Date: Fri May 4 10:32:49 2012
New Revision: 56490
URL: http://svn.reactos.org/svn/reactos?rev=56490&view=rev
Log:
[KERNEL32]
- Fix SetCurrentDirectoryA to return success when setting the current directory again
See issue #6874 for more details.
Modified:
trunk/reactos/dll/win32/kernel32/client/path.c
Modified: trunk/reactos/dll/win32/kernel32/client/path.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] Fri May 4 10:32:49 2012
@@ -1372,7 +1372,7 @@
/* Create the string that describes the output buffer from the caller */
CallerBuffer.Length = 0;
CallerBuffer.Buffer = lpBuffer;
-
+
/* How much space does the caller have? */
if (nBufferLength <= UNICODE_STRING_MAX_CHARS)
{
@@ -1407,7 +1407,7 @@
Status);
DbgPrint(" Path = %wZ\n", &PathString);
}
-
+
/* Check if the failure was due to a small buffer */
if (Status == STATUS_BUFFER_TOO_SMALL)
{
@@ -1425,7 +1425,7 @@
{
/* It worked! Write the file part now */
if (lpFilePart) *lpFilePart = &lpBuffer[FilePartSize];
-
+
/* Convert the final result length */
Result = CallerBuffer.Length / sizeof(WCHAR);
}
@@ -2205,7 +2205,7 @@
DirName = Basep8BitStringToStaticUnicodeString(lpPathName);
if (!DirName) return FALSE;
- if (CheckForSameCurdir(DirName)) return FALSE;
+ if (CheckForSameCurdir(DirName)) return TRUE;
Status = RtlSetCurrentDirectory_U(DirName);
if (NT_SUCCESS(Status)) return TRUE;
Author: cgutman
Date: Thu May 3 18:38:59 2012
New Revision: 56484
URL: http://svn.reactos.org/svn/reactos?rev=56484&view=rev
Log:
[TCPIP]
- Update the cached link and IP information when a link status change occurs
Modified:
trunk/reactos/drivers/network/tcpip/datalink/lan.c
Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Thu May 3 18:38:59 2012
@@ -734,6 +734,10 @@
Context->Adapter->CompletingReset = FALSE;
+ /* Update the IP and link status information cached in TCP */
+ TCPUpdateInterfaceIPInformation(Interface);
+ TCPUpdateInterfaceLinkStatus(Interface);
+
/* We're done here if the adapter isn't connected */
if (Context->State != LAN_STATE_STARTED)
{