Commit graph

78817 commits

Author SHA1 Message Date
Jérôme Gardou b4debdcf4d [KMTEST:FSRTL] Add more tests for MCB API
These were obtained through debug prints of fastfat_new in ReactOS.
2020-12-08 11:48:00 +01:00
Jérôme Gardou 7bbfde2b49 [KMTESTS] Add more tests for CcCopyRead 2020-12-08 11:48:00 +01:00
Jérôme Gardou 08cf040dd5 [KMTESTS] Add more tests for CcCopyWrite 2020-12-08 11:48:00 +01:00
Victor Perevertkin 016dc28793
[NTOS:CONFIG] Release the lock in a failure case in CmLoadKey
This is a workaround, the real issue is still not resolved
CORE-17263
2020-12-08 13:44:27 +03:00
Victor Perevertkin da1f4ed6af
[SCSIPORT] Fix setting the "Driver" field in the DeviceMap\Scsi registry key 2020-12-08 01:32:15 +03:00
Eric Kohl d9e20ae3fe Implement the StorageCoInstaller and configure it for CD-ROM and Disk devices
This sets the friendly name for CD-ROM and Disk devices.
2020-12-07 23:17:29 +01:00
Hermès Bélusca-Maïto 3d980c4a2c
[NTOS:FSTUB] Addendum to 29615fee and 8d2fe541: Further remove useless casts.
Also, fix the MBR checksum calculation (missing ~CheckSum + 1), to fix
the calculation in accordance with how MS calculates the MBR checksums
(and what we do as well in
https://github.com/reactos/reactos/blob/master/base/setup/lib/utils/partlist.c#L1581
https://github.com/reactos/reactos/blob/master/boot/freeldr/freeldr/arch/i386/hwdisk.c#L291
).
2020-12-07 22:52:42 +01:00
Hermès Bélusca-Maïto fd053237cb
[NTOS:FSTUB] Minor formatting; put the PAGED_CODE() macros in evidence (instead of being lost in the declarations). 2020-12-07 22:51:15 +01:00
Victor Perevertkin 29615feeb6
[FSTUB] Fix bugs from 8d2fe54188
The buffer is now PUCHAR or PVOID everywhere
2020-12-07 19:50:51 +03:00
Victor Perevertkin 8d2fe54188
[FSTUB] Fix out of bounds access in IoReadDiskSignature
- Convert PARTITION_TABLE_OFFSET to the number of bytes instead of
  (number of bytes) / 2. This avoids many confusing casts
- Use a cache aligned buffer for MBR
2020-12-07 14:43:34 +03:00
Jérôme Gardou 5d4ece342c [CMAKE] Add a NO_REACTOS_BUILDNO option
This allows to not generate buildno.h and version.h after each commit and trigger the relinking of the complete module list
2020-12-07 11:32:37 +01:00
Hermès Bélusca-Maïto 7ae3d530db
[PSDK] Re-arrange DISK/DRIVE/PARTITION layout-related structures in ntdddisk.h and winioctl.h. Add few missing structures in winioctl.h. 2020-12-06 23:44:10 +01:00
Victor Perevertkin 39c48a4d91
[USBSTOR] Remove workarounds for old storage stack 2020-12-06 23:32:29 +03:00
Victor Perevertkin aa05649902
[SETUPAPI] Do not use strlen on buffers which may possibly contain REG_MULTI_SZ
CORE-14187
2020-12-06 19:49:57 +03:00
Victor Perevertkin ff13301eb2
[UMPNPMGR] Set the data type in all cases of PNP_GetDeviceRegProp
CORE-14187
2020-12-06 19:48:38 +03:00
Victor Perevertkin 2d6c6fa38d
[PARTMGR] Register a disk interface for disk PDO
CORE-14187
2020-12-06 19:47:15 +03:00
Timo Kreuzer 883ae6d93b [RTL] Fix RtlImageDirectoryEntryToData to support both 32 and 64 bit images 2020-12-06 16:37:57 +01:00
Eric Kohl cac7b003c0 Implement IRP_MN_QUERY_DEVICE_TEXT.DeviceTextLocationInformation 2020-12-06 12:42:50 +01:00
Victor Perevertkin f722be93d5
[USBSTOR] Enable USB (ATAPI) cdroms
With the cdrom_new driver, they now work

CORE-16112
2020-12-06 02:08:32 +03:00
Victor Perevertkin cbe88e287f
[USBSTOR][SCSIPORT] Use STORAGE_ADAPTER_DESCRIPTOR from WIN8
This way, these drivers are more compatible with classpnp and cdrom used
by ReactOS (and don't fire asserts)
2020-12-06 01:57:56 +03:00
Victor Perevertkin 139e8f5308
[BOOTDATA] Fix boot (addendum to dd56e065bc)
- GenCdRom is actually required now to be in CDDB
- Forgot to add partmgr registry keys

CORE-6264
2020-12-06 01:55:20 +03:00
Victor Perevertkin dd56e065bc
[REACTOS] Enable PnP storage stack
- Use PnP storage class drivers
- Make partmgr an upper filter driver for Disk class
- Fill upper filters in txtsetup and usetup/devinst
- Add cdrom driver to the critical device database

CORE-6264
2020-12-05 22:30:43 +03:00
Victor Perevertkin fb155b4ea4
[SCSIPORT] Fix Sense request sending
- Pass all SRB flags which Windows scsiport passes
- Correctly reset the queue after completion

This fixes the bug when MS cdrom driver hangs after media ejection
2020-12-05 22:28:54 +03:00
Victor Perevertkin a97c6e0aa9
[SCSIPORT] Make the driver PnP-aware
Basic functions are implemented in order to work in PnP stack,
only legacy (non-pnp) miniport drivers are supported.
Tested mostly with uniata

CORE-17132
2020-12-05 22:28:54 +03:00
Victor Perevertkin 582ca68696
[NTOS:PNP] Improve and refactor PnP notifications
- BUGFIX: do not call IoGetRelatedTargetDevice while guarded mutex is acquired
  (the function issues an APC, but they are disabled inside a critical section)
- BUGFIX: only the beginning of a structure for GUID_PNP_CUSTOM_NOTIFICATION was copied and queued.
  Just pass it as-is to a subscriber, without copying
- Don't convert event GUID to string, store and compare GUID struct itself
- Split IopNotifyPlugPlayNotification into 3 functions for each type of notification
  (less stack usage and for future changes)
- Move initialization code for notifications into a separate routine
- Use separate lists and locks for every type of notification
- Put "TargetDeviceChange" notifications into their place inside DEVICE_NODE
2020-12-05 22:25:40 +03:00
Victor Perevertkin e3198fb644
[NTOS:PNP] Check if APCs are enabled before waiting inside IopSynchronousCall 2020-12-05 22:25:39 +03:00
Victor Perevertkin 9eafb2971f
[NTOS:CONFIG] Comment out the assertion until fixed
CORE-17263
2020-12-05 22:17:08 +03:00
Victor Perevertkin 15a7b9dd2f
[CLASSPNP][CDROM_NEW][DISK_NEW] Fix clang build
CORE-17129
2020-12-05 22:15:29 +03:00
Victor Perevertkin fe1b98fc36
[CLASSPNP] Fix amd64 build
CORE-17129
2020-12-05 22:15:10 +03:00
Victor Perevertkin eb682bbfab
[DISK_NEW] Various small fixes
- Silence a (possibly wrong) assert in DiskShutdownFlush
- Fix build with GCC and MSVC amd64

CORE-17129
2020-12-05 22:14:50 +03:00
Mark Jansen e1523dd28e [NTDLL_APITEST] Add test showing that RtlImageDirectoryEntryToData works on 32-bit and 64-bit images 2020-12-05 17:03:24 +01:00
Victor Perevertkin 99f16dc8a7
[STORAHCI] Do not put the driver onto cd
Meanwhile, fix add_registry_inf usage (it is really a driver inf)
2020-12-05 18:06:42 +03:00
Victor Perevertkin 16e5ce8fb1
[CMAKE] Use C_STANDARD property instead of command line option
Addendum to 64211aa696 and 19779b3f96
2020-12-05 15:35:06 +03:00
Jérôme Gardou 0db79d4aa9 [NTOSKRNL:FSRTL] Fix memory corruption when pruning tunnel cache 2020-12-04 16:08:14 +01:00
Jérôme Gardou 3ec3e1a7f6 [BTRFS] Fix wrong condition check 2020-12-04 15:49:39 +01:00
Hervé Poussineau 19779b3f96 [CMAKE] Our C code base is C99, so mark it as such.
This fixes 64211aa696, which mistakenly declared C11 as default.
2020-12-01 20:42:41 +01:00
Hervé Poussineau 06a6eda0a1 [DDK] Use FORCEINLINE instead of __inline, as in other DDK headers 2020-12-01 18:56:02 +01:00
Hervé Poussineau b483be4af2 [UMPNPMGR] Remove invalid prototype of inline function
This fixes eede1b9b7a.
2020-12-01 18:51:42 +01:00
Hervé Poussineau 64211aa696 [CMAKE] Declare that we want to use C11/C++11
That way, we won't use whatever standard is the default on whatever compiler we are using.
This should also prevent using more recent features without warning.
2020-12-01 18:51:42 +01:00
Hervé Poussineau 4469ab3620 [CMAKE] Disable compression of debug sections in GCC <= 7.0
We use MSVC, Clang or GCC > 7.0 these days.
2020-12-01 18:44:53 +01:00
Riley Bell 3014417919 [SHELL32] Hide "This version of ReactOS is registered to:" text on condition (#3325)
When the system is not installed yet (e.g. LiveCD or 2nd installation stage)
there is no registered user and organization, so no need to show this text
label in the shell about dialog.

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2020-11-30 03:12:32 +03:00
Oleg Dubinskiy 6bf7f83b2a
[MSGINA] Improve exports for all stubbed functions (#3256)
Since they are completely undocumented and unlikely will be implemented in ROS,
stubbing them only in spec file seems to be a better solution than adding wrong
prototypes.

Use `stdcall -stub` instead of `stub` and enable parameters of the functions.
This allows to properly load our msgina.dll in Windows XP/2003.

Although it still doesn't boot to desktop with dll replaced, but nevertheless
the system crash that was caused by stubbed functions does no longer happen.
2020-11-28 17:32:53 +03:00
Oleg Dubinskiy c0d2cd508f
[MSGINA] Implement ShellTurnOffDialog (#3254)
Based on the following prototype: http://diendan.congdongcviet.com/threads/t13622::tim-handle-cua-cua-so-tat-may-tren-windows-nhu-the-nao.cpp?p=69284#post69284 (line 32) and return ShellShutdownDialog from it with all required parameters.
It allows to open the shutdown dialog properly from the Start menu with shell32.dll from Windows Server 2003 SP2 (when installing ReactOS as Workstation).

CORE-17313
2020-11-28 17:22:46 +03:00
Thomas Faber 828d5fa93e
[NTOS:IO] Reduce stack usage in IopLoadServiceModule. CORE-17215 2020-11-27 12:44:35 +01:00
Thomas Faber 2858ff53ce
[NTOS:KD] Avoid large stack buffer in KdpPrint. CORE-17215 2020-11-27 10:31:45 +01:00
Thomas Faber ae1d272add
[NTOS:PNP] Avoid recursion in IopTraverseDeviceTree(Node). CORE-17215 2020-11-27 10:31:41 +01:00
Stanislav Motylkov 5cb9f8765b
[SMSS] Revert commit 131bc73
This is now fixed properly by de16ef3.
2020-11-26 13:06:20 +03:00
Stanislav Motylkov 34a634bbf6
[PARTINFO] Fix GitHub MSVC (amd64) build
Addendum to 878186b.
2020-11-26 12:22:31 +03:00
Hermès Bélusca-Maïto 878186b0c5
[ROSAPPS:PARTINFO] Implement display of IOCTL_DISK_GET_DRIVE_LAYOUT_EX info, for both MBR and GPT disks. 2020-11-26 03:33:40 +01:00
Hermès Bélusca-Maïto 118fa50269
[ROSAPPS:PARTINFO] Code formatting. 2020-11-26 03:33:37 +01:00