Commit graph

702 commits

Author SHA1 Message Date
Thomas Faber e4e86c32e7
[PORTCLS] Handle failure return from QueryPowerChangeState. CORE-16611 2020-02-08 13:07:34 +01:00
Thomas Faber 5a43c52bbb
[PORTCLS] Return STATUS_PENDING after calling IoMarkIrpPending. CORE-16611 2020-02-08 13:07:34 +01:00
Thomas Faber 606c912aa4
[PORTCLS] Don't unnecessarily wait for lower drivers to complete power IRPs. CORE-16611
Also use PoCallDriver to forward power IRPs.
2020-02-08 13:07:34 +01:00
Hervé Poussineau 40b2f65f0c [ISAPNP] Correctly calculate checksum
See appendix B.2 of "Plug and Play ISA Specification 1.0a"
2020-02-07 23:48:53 +01:00
Thomas Faber f32e1acd3c
[USBHUB] Only break into the debugger in the case that is actually unimplemented. CORE-16394 2020-02-01 13:17:30 +01:00
Thomas Faber 9215413a68
[FLTMGR] Safely query object name in FltpGetObjectName. CID 1420811 2020-01-18 13:19:22 +01:00
Serge Gautherie 82d2f13cea [FLOPPY_NEW] WindowsSync to 8fb512a (#2238)
* [FLOPPY_NEW] Make 6 '#ifdef' explicit about '__REACTOS__'

* [FLOPPY_NEW] RtlStringCbPrintf?() need bytes, not chars

Import
8fb512ac67
2020-01-14 18:50:19 +01:00
Thomas Faber bd7121862a
[NTFS] Fix use after free in failure case of NtfsMountVolume.
NtfsGetVolumeData frees FileRecLookasideList in case of failure, so don't
free it again.
Dereferencing NewDeviceObject invalidates Vcb.
2020-01-11 14:10:55 +01:00
Suraj K Suresh 88f7be101a [UDFS] Fix uninitialized var use in UDFCommonCreate, return the right error code
CORE-16174
2020-01-11 02:45:45 +02:00
Serge Gautherie e2b536bcb1 [KS] KsQueryInformationFile(): Fix 'FastIoQueryBasicInfo' copypasta (#2236)
Addendum to commit 4725a4fd (r42117).
2020-01-07 15:13:40 +01:00
Oleg Dubinskiy 611d925d32 [USB] Update the names of new USB drivers 2020-01-06 21:16:08 +02:00
Oleg Dubinskiy 83c07f4e4c [SDK][USB] Delete old USB drivers and libusb 2020-01-06 21:16:08 +02:00
Hermès Bélusca-Maïto afb14bff33
[BLUE] Add IOCTL buffers validation. Addendum to commit bfd8a848.
Also convert all sizes and positions of CONSOLE_DRAW to USHORT since
this is the standard type for all console buffer positions & sizes
(minimum value 0, maximum value 0xFFFF == 65535).
2020-01-03 17:17:03 +01:00
Thomas Faber 0d745e0698
[DISK_NEW] Return correct info size in failure case of DiskIoctlGetPartitionInfoEx. 2020-01-02 16:36:15 +01:00
Thomas Faber 2fa7b1dcc1
[CDROM] Return the correct data length for IOCTL_DISK_GET_LENGTH_INFO. CORE-16607 2020-01-02 14:08:46 +01:00
Victor Perevertkin e92ab76d0d [REACTOS] Exclude some modules from clang-format 2019-12-28 01:23:49 +02:00
Hermès Bélusca-Maïto 1928e170f2
[BLUE] Fix a visual regression introduced in bfd8a848: Don't touch INBV when resetting internal screen state during driver loading. 2019-12-24 16:13:10 +01:00
Hermès Bélusca-Maïto aca7ff54b0
[BOOTVID] Correctly fix scrolling and printing when the scroll region contains the whole screen.
Addendum fixes to ca370b49 (r52239) and a965ca6b (r52409).

- Fix the comments to explain what is really happening.

- Fix the boundary calculations in VidDisplayString() so that we can
  correctly display a character in the very last column before going
  to the next line, and fix similarly the vertical boundary calculation.

- Port the fixes to the ARM code.
2019-12-23 21:06:59 +01:00
Hermès Bélusca-Maïto 93e9877225
[BOOTVID] Factor out the common code that is used before setting pixels. 2019-12-23 21:06:58 +01:00
Hermès Bélusca-Maïto 4f76cffb59
[BOOTVID] Code style fixes; Replace some 'do-while' loops by 'for' loops when it makes the code simpler.
+ Fix a potential bug in BitBlt() "4bpp blitting" in case Top == Bottom (i.e. Height == 0).
2019-12-23 21:06:57 +01:00
Hermès Bélusca-Maïto 1d2b0fbcd1
[BOOTVID] Replace hardcoded screen and font size numbers by #define-d values. 2019-12-23 21:06:57 +01:00
Victor Perevertkin 23147330dd
[USBOHCI] Use KeQueryTickCount for timeouts instead of KeQuerySystemTime 2019-12-16 03:21:28 +03:00
Victor Perevertkin 1d9e03b708
[KS] Use KeQueryTickCount for timeouts instead of KeQuerySystemTime
This avoids overflow when system time is changed between calls (for example, via NTP)
2019-12-16 02:28:41 +03:00
Hermès Bélusca-Maïto bfd8a84865
[BLUE] Improve initialization and interfacing with INBV.
CORE-15901

This fixes display reset transition when an external module acquired
INBV ownership and then released it, similarly to what was done in
commit 0ad65796 for VIDEOPRT.

For this a backup screenbuffer is used to store the contents of the
screen just before an INBV screen acquire transition, and these contents
are restored when it is detected that INBV ownership has been released.
Also, the active text font associated with the active console code-page
is restored, as well as the cursor state and shape.

In addition, any user of BLUE.SYS is now required to explicitly issue
a new IOCTL_CONSOLE_RESET_SCREEN to either enable or disable the screen.
This allows avoiding nasty unwanted screen mode switches when a handle
to the \Device\BlueScreen device is opened but no screen mode switch was
actually wanted - This "fixes" this annoyance on ReactOS and Windows,
when these are running witha VGA-compatible video driver and one wants
to look at properties of the \Device\BlueScreen device using
Sysinternals' WinObj.

Following this, we don't need to check anymore for explicit INBV
ownership by issuing calls to InbvCheckDisplayOwnership(), but instead
we check whether the screen has beeen manually enabled using the
aforementioned IOCTL. This partly supersedes commit 8b553a4b, and allows
fixing the second bug, namely that if we start ReactOS without the
/NOGUIBOOT option (and thus, INBV is active during boot), USETUP would
not show up anything because BLUE.SYS wouldn't display anything on screen.
See CORE-15901.

[USETUP][CONSRV] Call IOCTL_CONSOLE_RESET_SCREEN to tell BlueScreen device to enable the screen.
2019-12-15 03:37:52 +01:00
Hermès Bélusca-Maïto 67c9e81cb0
[BLUE] Use ExFreePoolWithTag(). 2019-12-15 03:36:24 +01:00
Hermès Bélusca-Maïto 45b655ec3a
[BLUE] Improve includes. 2019-12-15 03:36:21 +01:00
Hermès Bélusca-Maïto d684f90632
[BLUE] Code formatting, add SAL2 annotations, and update file source headers. 2019-12-15 03:36:17 +01:00
Thomas Faber be617cf987
[ACPICA] Update to version 20191213. CORE-16559 2019-12-14 09:48:11 +01:00
Eric Kohl c1f22c88ca [STORAGE] Storage driver cleanup part 5 (last part)
Move the fdc and flpydrv drivers into the floppy directory.
2019-11-30 13:33:32 +01:00
Eric Kohl 2a2040a9fe [STORAGE] Storage driver cleanup part 4
Move the floppy driver into the floppy/floppy directory.
2019-11-30 13:13:59 +01:00
Eric Kohl 9393c6a48b [STORAGE] Storage driver cleanup part 3
Move the storahci driver into the port directory.
2019-11-30 12:58:59 +01:00
Eric Kohl d736908967 [STORAGE] Storage driver cleanup part 2
Move the scsiport driver into the port directory.
2019-11-30 12:19:03 +01:00
Eric Kohl 6b687478d1 [STORAGE] Storage driver cleanup part 1
Move the classpnp driver into the class directory because it is a class driver, just like the class2 driver.
2019-11-30 11:54:33 +01:00
Hermès Bélusca-Maïto 75f188c200
[PCIX][BLUE] Don't hardcode values in KeDelayExecutionThread() call. Remove deprecated code. 2019-11-25 00:41:48 +01:00
Mark Jansen d4a0549eb6
[MOUNTMGR] Fix out of bounds write
CORE-16530
2019-11-23 16:24:56 +01:00
Pierre Schweitzer 0917815efa
[CDROM] Forcibly declare our CD devices to the MountMgr 2019-11-19 19:05:23 +01:00
Hermès Bélusca-Maïto ea6d427d10
[I8042PRT] Remove dead commented-out code; Allow sending ROS-specific commands to the kernel debugger since KD64 also support them.
[NTOS:MM] Remove an extra ')' in a DbgPrint() string.
2019-11-17 23:21:55 +01:00
Thomas Faber d170b6ab3e
[ACPICA] Update to version 20191018. CORE-16434
This includes a cherry-pick of
3e0d03893c
to fix build.
2019-11-16 16:12:16 +01:00
Pierre Schweitzer cc5c307b8e
[BTRFS] Fix MSVC build 2019-11-13 00:03:22 +01:00
Pierre Schweitzer 62e630de4c
[BTRFS] Upgrade to 1.5
CORE-16494
2019-11-12 19:35:43 +01:00
Pierre Schweitzer 887200703c
[CLASS2] Drop the drive letter hack 2019-11-11 18:18:32 +01:00
Hermès Bélusca-Maïto 3b2f158593
[NTOS][CLASS2][FFS][WIN32SS] Fix some pool tags so that they correctly appear in pool dump lists.
Reminder: in the code they are defined using reverse byte order
(Windows/ReactOS are little-endian OSes).
2019-11-01 19:12:27 +01:00
Pierre Schweitzer 6889cff5b5
[FLOPPY] Make floppy drives letters being handled by the MountMgr
This involves many changes/fixes in the floppy driver:
- Stop creating ourselves our DOS device, it's up to the MountMgr or to the kernel;
- Report each new floppy drive to the MountMgr (this is a hack for now);
- As a consequence, stop storing the symlink name into the DRIVE_INFO structure;
- Store the device name instead;
- On IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, don't return DOS device, but device name;
- On IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, properly return if buffer is way too small;
- Hackplement IOCTL_MOUNTDEV_QUERY_UNIQUE_ID so that it returns device name.
2019-10-27 11:35:23 +01:00
Robert Naumann 5f99f5c1a7 [REISERFS] Fix a copy paste Error. CID 1363527 2019-10-23 17:23:05 +02:00
Robert Naumann b8032d98a9 [UDFS] Fix a copy paste error. CID1321910 2019-10-23 17:23:05 +02:00
Pierre Schweitzer 457612702b
[MOUNTMGR] Fix invalid WorkerReferences check in QueueWorkItem()
This fixes shutting down ReactOS under certain circumstances, where
the references were incremented, but no worker thread started.
Also, took the opportunity to clarify the WorkerReferences comparisons
where relevant.

CORE-16446
2019-10-22 21:53:48 +02:00
Pierre Schweitzer b68104dd87
[DISK] Forcibly declare our partitions to the MountMgr
Because our disk.sys doesn't do anything related to PnP
(compared to disk_new.sys), forcibly declare our partitions
to the MountMgr so that it can references them and assign
them a DOS drive letter on demand later on.
2019-10-21 16:50:36 +02:00
Pierre Schweitzer 410c606999
[CLASS2] Hackplement support for IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
This is required so that MountMgr can handle devices that are still
using class2 instead of classpnp.
Given we have no unique ID to return, we'll return device path, which
is far from perfect but which is enough for now to have everything
working.
2019-10-21 16:45:28 +02:00
Pierre Schweitzer 16fcf694ef
[MOUNTMGR] Fix setting up reparse index file name
This fixes memory smashing while attempting to volume
reparse index (we were previously trying to copy the
name on itself, in the middle of itself...).
This code won't go farther on FAT, it requires NTFS.

Now, with this, ReactOS can properly boot with MountMgr
handling DOS devices without any crash or code disabled.
Cf: what was written in 7608ac9.

Modifications in class2, disk, and ntoskrnl are still to
be committed to enable all this.
2019-10-21 12:58:30 +02:00
Pierre Schweitzer bced3eaa25
[MOUNTMGR] That was not meant to be committed
Even though it shows there might be a bug in the
code handling remote databases in the MountMgr ;-)

Addendum to 7608ac9
2019-10-21 11:03:43 +02:00