Commit graph

43460 commits

Author SHA1 Message Date
Cameron Gutman 0d3516871b [NTOSKRNL]
- Don't overwrite the ACPI hardware key on every boot

svn path=/trunk/; revision=48581
2010-08-21 21:39:53 +00:00
Cameron Gutman 68eef5481f [NTOSKRNL]
- Append the DLL name and NULL terminate the string more nicely

svn path=/trunk/; revision=48580
2010-08-21 21:25:07 +00:00
Timo Kreuzer 80cc3a0e88 [WIN32K]
- Allocate the DCs prgnVis in DC_AllocDC, instead of "on demand" in GdiSelectVisRgn and properly handle failure case. This fixes a possible crash, when running out of gdi handles.

svn path=/trunk/; revision=48579
2010-08-21 19:55:09 +00:00
Timo Kreuzer 02cb45ab9c [WIN32K]
- co_IntTranslateMouseMessage: properly initialize *HitTest and only send WM_NCHITTEST when the message is going to be removed
- co_IntPeekMessage: Prevent possible use of uninitialized HitTest by ProcessMouseMessage()
- Patch by Jan Roeloffzen [jroeloffzen at hotmail dot com]
- Fixes bug 2139

svn path=/trunk/; revision=48576
2010-08-20 19:24:48 +00:00
Amine Khaldi ca4003c9f8 [PSDK]
- Add missing DISPLAY_BRIGHTNESS and some related definitions.

svn path=/trunk/; revision=48575
2010-08-20 16:55:33 +00:00
Cameron Gutman 5122323eb8 [NTOSKRNL]
- The trailing NULL is NOT included in the string length
- IopNotifyPlugPlayNotification needs a pointer to an actual GUID not a UNICODE_STRING
- The Power Manager can now see ACPI power devices again
- ROS will now do a graceful shutdown and power off if the power button is pressed and ACPI is enabled

svn path=/trunk/; revision=48574
2010-08-20 04:45:25 +00:00
Cameron Gutman 1883a6f208 [ACPI]
- Do all of the work inside the DPC so we don't have IRQL issues when entering the memory manager
- This is a slight hack but we can be assured that data won't be over 24 bits unless somebody wants to push the power/sleep button over 16 million times

svn path=/trunk/; revision=48573
2010-08-20 03:08:50 +00:00
Cameron Gutman 62f520433c [NTOSKRNL]
- Shutdown the system if we receive a SYS_BUTTON_POWER event
- Register for GUID_DEVICE_LID arrival events so we can receive lid events

svn path=/trunk/; revision=48572
2010-08-20 02:27:05 +00:00
Cameron Gutman ab9dae987d [NTOSKRNL]
- Add a special case to IopInitializeDevice for raw devices
- Call IopInitializeDevice to set up our device node and ready it to start
- Fixes assertions hit by ACPI and PCIX

svn path=/trunk/; revision=48570
2010-08-19 23:26:44 +00:00
Cameron Gutman 8d8399c2e5 [OSKITTCP]
- Disable routing because oskit needs to let our code do that
- Comment out the ACK hack and restore the default BSD behavior

svn path=/trunk/; revision=48569
2010-08-19 22:15:58 +00:00
Michael Martin 6a0074f795 [Win32k]
- For SetTimer nIDEvent can be 0 in which case return 1. Zero still needs to be used for nIDEvent when killing the timer. Fixes bug 5553.
- Modify windowless timers to use IDEvent values decrementing from the max number of windowless timers vice incrementing from 1. Done to match windows behavior.


svn path=/trunk/; revision=48568
2010-08-19 10:52:36 +00:00
Timo Kreuzer f87ad01e1a [NTOSKRNL]
- Add missing parentheses. Fixes "cont"

svn path=/trunk/; revision=48567
2010-08-19 10:03:03 +00:00
Timo Kreuzer 681307ff21 [NTOSKRNL]
Fix handling of next instruction in kdbg.
Patch by Daniel Zimmermann, modified by Aleksey Bragin

See issue #4457 for more details.

svn path=/trunk/; revision=48566
2010-08-19 09:03:36 +00:00
Timo Kreuzer 6fb40574c2 [NTOSKRNL]
- Implement support for /BURNMEMORY option.
- Don't stop boot on bad memory type
Patch by Jay Smith, modified by Aleksey, even more modified by me.

See issue #4957 for more details.

svn path=/trunk/; revision=48565
2010-08-19 08:50:23 +00:00
Cameron Gutman 44e8a7f7b6 [NETSTAT]
- Allocate memory for the TCP table properly
- Only netstat -a should show UDP connections
- Patch by Jan Roeloffzen [jroeloffzen at hotmail dot com]

svn path=/trunk/; revision=48564
2010-08-19 06:25:20 +00:00
Cameron Gutman f2d4e1a828 [IPHLPAPI]
- Copy our TCP table into the caller's buffer if we actually get one (not yet!)
- Return ERROR_NO_DATA if we fail to get anything from TCP/IP
- Fixes bug #4185

svn path=/trunk/; revision=48563
2010-08-19 06:05:35 +00:00
Timo Kreuzer 5ae5a35726 [NTOSKRNL]
- Initialize the Parent member of the new Vad to NULL. This also initializes the Balance to 0 aka RtlBalancedAvlTree
Should fix the failed assertion that randomly occurs.

svn path=/trunk/; revision=48562
2010-08-19 05:10:16 +00:00
Cameron Gutman 8f474295b5 [IP]
- Fix a major bug in socket closure. Prior to this, a socket with pending IRPs that could not be satisfied when the socket was closed would be destroyed without completing the pending requests. Now, we check all of our IRP queues if we get a SEL_FIN signal and kill all the requests that cannot be satisfied immediately.
- Maybe it's just me but Firefox 2 seems much more responsive after this fix (like actually usable!)

svn path=/trunk/; revision=48561
2010-08-19 02:41:54 +00:00
Timo Kreuzer 1cbf4c4057 [FASTFAT]
Make our FAT driver PNP aware.
On PNP requests it should handle, it will return STATUS_NOT_IMPLEMENTED.
On the others, it will pass them to lower driver.
This is the first step outside the kernel into getting IoGetRelatedTargetDevice (and so notifications) working.
It doesn't work at the moment, as class2 doesn't handle PNP.

[NTOSKRNL]
Some fixes to IRP cancelation process:
- Renamed IopRemoveThreadIrp() to IopDisassociateThreadIrp() to match Windows 2k3
- Made dead IRP global, to make its debug easier.
- IopDisassociateThreadIrp(), Handle dead IRP at dispatch level, using IoCompletionLock.
- IopDisassociateThreadIrp(), Use the proper error code to write the entry to logs.
- IoCancelIrp(), removed non needed ASSERT, which is even not present on Windows, removed corresponding var as well.
- IoCancelIrp(), fixed parameters to KeBugCheckEx() call.
- IoCancelThreadIo() is pageable.
- IoCancelThreadIo() under Windows isn't using given thread, but using current. Do the same here.
All that stuff doesn't fix bug #5550, it comes from outside.

Patch by Pierre Schweitzer, modified by me to make it compile. If it breaks anything, don't blame me!

svn path=/trunk/; revision=48560
2010-08-18 23:21:15 +00:00
Timo Kreuzer 3d5db91752 [NTOSKRNL]
- Simplified IopGetRelatedTargetDevice implementation
- Added notification in case of success in NtSetVolumeInformationFile()
Patch by Pierre Schweitzer

svn path=/trunk/; revision=48559
2010-08-17 16:04:46 +00:00
Timo Kreuzer 2ded5adf7c [NTOSKRNL]
- Fixed IoGetRequestorProcess, IoGetRequestorProcessId, IoGetRequestorSessionId
- Pass user buffer in NtNotifyChangeDirectoryFile
- Fixed magic value in IoGetPagingIoPriority
Patch by Pierre Schweitzer

svn path=/trunk/; revision=48557
2010-08-16 20:18:25 +00:00
Timo Kreuzer 49a96cdea9 [NTDLL]
LdrPerformRelocations: Delta is a LONG_PTR rather than ULONG_PTR

See issue #5577 for more details.

svn path=/trunk/; revision=48556
2010-08-16 01:57:09 +00:00
Timo Kreuzer 40f30e9422 [WIN32K]
- Remove IntEngExtEscape stub. This function is completely useless. If the driver doesn't provide a DrvEscape, the function should simply fail and must return 0, not -1.
- If a NULL surface is passed, pass on NULL pso to the driver function

See issue #4563 for more details.

svn path=/trunk/; revision=48555
2010-08-16 01:29:13 +00:00
Timo Kreuzer d35828af5a [user32_winetest]
Skip 2 tests that hang on reactos. Patch by Giannis Adamopoulos

svn path=/trunk/; revision=48554
2010-08-16 00:06:55 +00:00
Aleksey Bragin a81b1fdd76 [NTOSKRNL]
- Revert 48546. The code was correct, and there is more of same code in other places which firstly cancels the IRP and then moves to the next entry. The actual bug is somewhere else.
See issue #5550 for more details.

svn path=/trunk/; revision=48551
2010-08-15 08:48:03 +00:00
evb fd24107d7d - IRP_MN_QUERY_RESOURCE_REQUIREMENTS half support now, PciQueryRequirements, PciAllocateIoRequrementsList, full implement, but PciBuildRequirementsList return 0 always for now
- Debug helpers: PciDebugPrintIoResReqList, PciDebugPrintIoResource, PciDebugCmResourceTypeToText
Now hit assert Assertion '(DeviceNode->Flags & DNF_ADDED)' failed at ntoskrnl/io/pnpmgr/pnpmgr.c line 201, too night to debug, maybe tomorow

svn path=/trunk/; revision=48550
2010-08-14 18:06:19 +00:00
evb d9bd0072a1 - IRP_MN_QUERY_RESOURCES support for PDO (PciQueryResources, PciAllocateCmResourceList), now remain IRP_MN_QUERY_RESOURCE_REQUIREMENTS to last device stack interogration from PNPMGR
svn path=/trunk/; revision=48549
2010-08-14 17:33:10 +00:00
evb af01479fbf - Add support for PnP IRP to PDO: IRP_MN_QUERY_BUS_INFORMATION (PciQueryBusInformation), IRP_MN_QUERY_ID (PciQueryId), IRP_MN_QUERY_DEVICE_TEXT (PciQueryDeviceText), IRP_MN_QUERY_CAPABILITIES (PciQueryCapabilities), IRP_MN_QUERY_DEVICE_RELATIONS (PciQueryTargetDeviceRelations implement, PciQueryEjectionRelations, stub)
- Stub support for PnP IRP to PDO: IRP_MN_QUERY_RESOURCE_REQUIREMENTS (PciQueryRequirements), IRP_MN_QUERY_RESOURCES(PciQueryResources)
- Add support for PnP IRP to FDO: IRP_MN_QUERY_CAPABILITIES (handle in PciFdoIrpQueryDeviceCapabilities)
- Build device capability UI number (PciDetermineSlotNumber), use PIR$ (seem support broken, need to check loader) or device property for bus not root
- Use parent attachee device and this PDO for build device/system wake states, latency, device/system power mappings
- PCI-ID manage support: PciInitIdBuffer, PciIdPrintf, PciIdPrintfAppend
- Debug helper: PciDebugDumpQueryCapabilities
- Thanks richard for advise + beer
PCI-X driver now pass 10000 codes lines!

svn path=/trunk/; revision=48548
2010-08-14 17:09:20 +00:00
Cameron Gutman 912704ceb8 [NTOSKRNL]
- Move to the next entry in the thread IRP list before calling IoCancelIrp because if everything works as expected and IoCompleteRequest is called, we could end up with the IRP ripped out from under us before can move to the next element
- See issue #5550 for details.

svn path=/trunk/; revision=48546
2010-08-14 14:55:12 +00:00
Cameron Gutman ccfa72f607 [WS2_32]
- Create a temporary variable and pass that to WSAIoctl for the bytes returned value instead of passing argp and corrupting the value we just retrieved

svn path=/trunk/; revision=48545
2010-08-14 13:48:31 +00:00
Aleksey Bragin 0be662421f [WINLOGON]
- NtInitializeRegistry expects not just CM_BOOT_FLAG_ACCEPTED, but a number of the accepted control set to be added to it. After fixing this, NtInitializeRegistry won't fail with STATUS_INVALID_PARAMETER (someone should check return status for errors...) anymore. As a result lazy flushing is enabled.

svn path=/trunk/; revision=48536
2010-08-13 22:02:17 +00:00
Aleksey Bragin e68f31b46a [FASTFAT_NEW]
- Implement asynchronous and delayed close operations.
- Fix a logical bug in FatiClose code, which led to always closing the file object (and freeing respective FCB/VCB/CCB), and then checking flags and queuing a delayed close. Instead, it should only try to close if it's not marked as a delayed close.
- Support stuff added (queues, mutex for closing lists, etc).
- Misc cleanup, debug silencing.

svn path=/trunk/; revision=48525
2010-08-12 21:59:22 +00:00
Cameron Gutman 8d3e4feb39 - I hate catching these things as the commit is going out
svn path=/trunk/; revision=48523
2010-08-12 13:15:35 +00:00
Cameron Gutman 17e0e75eb5 [MSAFD]
- Update lpcbBytesReturned when FIONREAD is called
- Fix the value inside lpErrno when XxxSocketInformation() fails
- Pass the unrecognized IOCTLs to the winsock helper (no behavior change for this yet because wshtcpip's WSHIoctl is unimplemented)

svn path=/trunk/; revision=48522
2010-08-12 13:13:19 +00:00
Aleksey Bragin 11f2175562 [FASTFAT_NEW]
- Plug in a commented out notification call in case of cleanup.
- Implement a case of device info query.
- Implement lock control.

svn path=/trunk/; revision=48518
2010-08-11 12:18:24 +00:00
Timo Kreuzer aac1625f1f [NTOSKRNL]
Stop using the new paged pool code, before ExpLoadInitialProcess is called. For so far unknown reasons, it causes evil things to happen. Fixes "Assertion NewSize < pool->UserSize failed"
See issue #5551 for more details.

svn path=/trunk/; revision=48517
2010-08-11 01:22:06 +00:00
Amine Khaldi da140c1ba3 [DDK]
- De-duplicate __GNU_EXTENSION.
- Apply a consistent formatting.

svn path=/trunk/; revision=48514
2010-08-10 20:50:55 +00:00
Aleksey Bragin 94c9f4008f [FASTFAT]
Pierre Schweitzer
- Fix volume opening on FAT volume. Commented out a directory check as it doesn't match realized tests, in spite of what's in WDK.

svn path=/trunk/; revision=48513
2010-08-10 20:08:31 +00:00
Amine Khaldi 0fb515fa5b [XDK]
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[DDK]
- Update XDK generated headers to reflect the recent changes.
- Update some header guards.
- Add some missing new lines at the end of files.
- Fix PUSB_DEVICE_HANDLE guard.
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[PSDK]
- Update some header guards.
- Add missing new line at the end of driverspecs.h
[NDIS]
- Update the ndis header guard.

svn path=/trunk/; revision=48511
2010-08-10 13:53:10 +00:00
Amine Khaldi 07bb7dd863 [PSDK]
- Add some missing headers' headers.

svn path=/trunk/; revision=48510
2010-08-10 11:27:27 +00:00
Amine Khaldi 3e2e35f5db [PSDK]
- Add WINELIB_NAME_AW and DECL_WINELIB_TYPE_AW to the wine specific imm.h.

svn path=/trunk/; revision=48509
2010-08-10 10:25:10 +00:00
Cameron Gutman 1fde230130 [WS2_32]
- Fix a crash when running with ws2_32 debugging on

svn path=/trunk/; revision=48507
2010-08-10 07:14:42 +00:00
Timo Kreuzer 713d12fd47 Add include guards in wine/ddk/imm.h and inlude it from wine/imm.h
svn path=/trunk/; revision=48503
2010-08-10 01:08:03 +00:00
Amine Khaldi a334719f12 [PSDK]
- Move INPUTCONTEXT and ImmLockIMC to the wine imm.h
- Add wingdi.h inclusion.

svn path=/trunk/; revision=48502
2010-08-10 00:46:27 +00:00
Timo Kreuzer 2bf65890b7 [WIN32K] Fix NtGdiMaskBlt to handle patterns correctly, use SRCAND, which is more optimized, instead of DSTERASE, and set fore and background colors correctly to not destroy alpha channel.
[SHELL32] Use MaskBlt to draw the shortcut overlay
Finally fixes bug 5455. Forever. (I hope.)

svn path=/trunk/; revision=48501
2010-08-09 23:28:19 +00:00
Amine Khaldi 329c3e4970 [PSDK]
- Add some missing imm.h definitions.
[IMM32]
- Fix imm.h inclusion.
[IPHLPAPI]
- Fix tdiinfo.h inclusion.

svn path=/trunk/; revision=48500
2010-08-09 22:53:07 +00:00
Amine Khaldi 7e8308d2f2 [DDK]
- Move several headers to PSDK where they belong.
[PSDK]
- ddrawi.h : Fix pUnkOuter.

svn path=/trunk/; revision=48499
2010-08-09 22:20:05 +00:00
Aleksey Bragin 03d3e84856 [FASTFAT_NEW]
- Implement opening an existing DCB.
- Add a bunch of useful macros and helper functions and use them throughout the code.
- Implement in-memory setendoffile set information class. On-disk to be done.
- Implement user fs ctrl wrapper with stubs.
- Fill up QueryVolumeInfo with classes it should handle. Silence up a warning about classes it should reject.

svn path=/trunk/; revision=48498
2010-08-09 21:33:17 +00:00
Amine Khaldi e787f57ee7 [DDK]
- Move several headers to PSDK where they belong.
- Add _ANONYMOUS_UNION.
- De-duplicate __GNU_EXTENSION definition from several headers.
- Remove semicolons after the closing bracket of extern "C"
- Add a missing one in ioaccess.h
- Apply a consistent formatting.
[PSDK]
- De-duplicate __GNU_EXTENSION definition from several headers.
- Add missing extern "C" opening bracket in ddkernel.h and remove the semicolon from the closing one.
- Add __GNU_EXTENSION definition to ddraw.h and remove the semicolon after the closing bracket of extern "C"
- Add missing extern "C" closing bracket in ddrawi.h
- Remove semicolons after the closing brackets of extern "C" in dinput.h, dmemmgr.h and sti.h
- Apply a consistent formatting.
[DXSDK]
- Move ddraw.h to PSDK.

svn path=/trunk/; revision=48497
2010-08-09 20:58:47 +00:00
Aleksey Bragin 07a6bcfb57 Carlo Bramix
- Prevent possible out-of-bounds access.
See issue #5505 for more details.

svn path=/trunk/; revision=48495
2010-08-09 20:41:41 +00:00