According to tests, legacy fp state is not saved in kernel mode.
Also add an int 2c to the path that changes cs, as it should not be used and probably never will be.
CORE-13525
This is done so that the caller doesn't need to know details
about particular architecture specifics, like VBR, MBR etc.
Extra checks and specific handling is also performed for supporting
bootloader installation on removable media:
- verify whether the media is a floppy or some other removable media,
- depending on which, a suitable file system is chosen,
- and if the media is not a floppy, do the supplemental partition
verifications to determine whether the media is a "super-floppy"
(in the partitioning sense).
This function could be generalized later to copy other files necessary
for the bootloader; removing also the currently hardcoded placement in
the installation source directory, and instead, using a configurable
path (specified in txtsetup.sif); etc.
Adapted from a commit by Timo Kreuzer (see PR #7420)
Co-Authored-By: Timo Kreuzer <timo.kreuzer@reactos.org>
KeFlushQueuedDpcs is used by some drivers, when unloading or removing a device, to be sure no DPC is still running their code. On a UP system this can be done "inline", on an SMP system, it requires to send an IPI to each processor that has DPCs queued and also synchronize it with the calling thread, which is what KeSetSystemAffinityThread does implicitly: When a queued DPC was detected on a remote processor (implying that processor is currently running at DISPATCH_LEVEL or above), KeSetSystemAffinityThread will schedule the current thread on that processor and send a DPC interrupt. The remote processor will handle that DPC interrupt once it is back below DISPATCH_LEVEL. It will only run the current thread, after all queued DPCs (including threaded DPCs) have finished running.
- Use _alloca instead of non-standard alloca
- Use _TCHAR instead of non-standard TCHAR
- Use _off_t instead of deprecated off_t
- Use _O_BINARY instead of O_BINARY
* [MKISOFS] Fix Clang check for macOS platforms
On macOS, CMAKE_C_COMPILER_ID is "AppleClang". While certainly Clang,
this does not match the exact string "Clang" that is being checked for,
and as a result the warning flags guarded thereby are not passed to the
compiler. With this change CMake will recognize both Clang and AppleClang.
* Update sdk/tools/mkisofs/CMakeLists.txt
- The original code was just incrementing the reference counts (RefCounts)
of the device objects or the device/file handles, without decrementing
them when closing the handles. This is now fixed.
Notice the following:
* When opening a file on a device (disk), the device's (and its
handle's) RefCount is incremented, and the file handle's RefCount
is incremented as well.
* When closing a file, the file handle's RefCount is decremented
(and the file closed if the RefCount reaches zero), and the file's
parent device handle is also closed, recursively.
This has the effect of decrementing the parent device handle's
RefCount, and the device's own RefCount is decremented as well.
IMPORTANT NOTE: The usefulness of handle-level RefCount is still
under question, and might be (consistently) removed in the future.
- Fix opening a device (disk) in direct access, when this device is
already opened. Indeed, we previously allowed direct access only if
the device was opened as such for the very first time (its RefCount
= 0 originally); no filesystem mounting was attempted as well.
Then for any later open-operations on this device (while keeping an
already-opened handle to it), filesystem access was assumed.
Thus, this problem would show up in two ways:
* Either the device is first opened for direct access, this succeeded
and no filesystem was mounted. Then, for any other open-operations,
the filesystem was NOT mounted, and opening files on it would fail.
Direct accesses would succeed but would create an unnecessary second
file handle.
* Or, the device is first opened for file-access: a filesystem was
mounted and file opening would succeed. Any other file opening
operation would succeed as well (if the file exists). But, a direct
access open-operation would fail, because now any open-operations on
the device would be assumed to be a file opening.
This is now correctly fixed. If direct-open is requested, just do it.
If this is a file opening, we open the device, then try to mount a
filesystem on it (if not already done), then we try to open the file.
If file opening fails, derereference the device.
- Pass the file path to the filesystem-specific Open() functions without
truncating the leading path separator, if any. This has to be handled
by the filesystem routines themselves.
This prevents MSVC from reordering the exports in a way that doesn't match our spec file. Also improve the algorithm to apply ordinals, by starting with the first specified ordinal, possibly reserving ordinals for anything declared without an ordinal before.
PathIsExeW is used and will exclude exe, com, pif, cmd, bat, scf and scr. The previous #6122 PR added support for the FTA_Exclude flag and that will exclude .lnk files.
CORE-19805
Addendum to commit baa47fa5e.
Similarly to what was originally done, have KdbpCliInterpretInitFile()
parse the KDBinit file by breaking back into the debugger.
But contrary to before, replace the deprecated call to KdbEnter() by
a standard DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C) . This allows
KdbEnterDebuggerException() to do the KdbpCliInterpretInitFile() call.
Additional fixes and improvements:
- Run KdbpCliInterpretInitFile() in full KDBG environment (interrupts
disabled, modified IRQL, own stack), like the usual interactive loop.
- The KDBinit data buffer must be in non-paged pool.
- Demote the "Could not open KDBinit" error to a DPRINT, so that it
doesn't pollute the debug log when the KDBG init function is called
early (before the storage stack is initialized), or if the file
doesn't exist -- since this is an optional feature.
- Move the printing pager state reset code (setting the number of
printed rows and columns to zero, and the output aborted flag)
to KdbpDoCommand(). This allows to keep the original behaviour,
while also inheriting it whenever KdbpDoCommand() is invoked
elsewhere (for example, from KdbpCliInterpretInitFile()).
- Use KdbPuts/Printf() instead of KdbpPrint() for the entry banners,
so that they aren't subject to the current printing pager state.
Do the same for the "command unknown" error in KdbpDoCommand().
- Add a "Type 'help' for a list of commands" banner, for the users.
- Replace the do-while-loop with a simple while-loop.
- Support loading protocols like XP
- Support most of the relevant EditFlags
- Support reading/writing the AlwaysShowExt and BrowserFlags properties
- Loads the list much faster with optimized code and delaying the large icon and description string
- Reduce the number of magic buffer sizes by replacing them with defines that are in the ballpark of being correct
- Implemented column sorting
- Removed custom icon extraction code
- Removed IDS_FILE_EXT_TYPE string because it must be the same as IDS_ANY_FILE
- Don't touch verb keys that are not edited to retain the original REG type
- Don't clobber unchanged %1 icon location when editing a type
CORE-19756
Those haven't been groomed anymore for more than 10 years. We had many thousands of
different freeldr builds with different behavior and bugs each, but nobody ever
did have the slightest motivation to update those hardcoded
FREELOADER_MAJOR_VERSION, FREELOADER_MINOR_VERSION, FREELOADER_PATCH_VERSION
from ver.h. And that is logical, because touching other modules will change the behavior
of freeldr as well, so it is absolutely impossible to groom anything like that correctly.
Instead we should simply do what we started to do in PR7383, which will at least give
some information (the actual sources it was built from) instead of some misleading voodoo-version.
This might slightly shrink the size of freeldr as well, but I was too lazy to measure by how much.