reactos/boot
Hermès Bélusca-Maïto 829ad06179
[FREELDR] fs.c: Simplify FileId checks; add missing DeviceId invalidation (#7385)
- Replace a lot of `MAX_FDS` by `_countof(FileData)`;

- The duplicated FileId validation logic is wrapped with
  the `IS_VALID_FILEID()` macro.

- When returning an invalid FileId value on purpose, use
  `INVALID_FILE_ID` instead of `MAX_FDS` (that could vary
  if the file handle table gets extended).
  And replace the `(ULONG)-1` also used for that purpose
  by `INVALID_FILE_ID`.

- Add missing DeviceId invalidation:
  * when failing to open a file handle in `ArcOpen()`;
  * when registering a new device in `FsRegisterDevice()`.
    There, having DeviceId always set to zero would tell
    the code that the corresponding device's file ID is
    the first one in the table, which is a BUG. (Many devices
    would have the same file ID...)

- In addition: massage a bit some indicial for-loops.
2024-10-01 22:14:01 +02:00
..
armllb [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
bcd Add .keep guard files in order to restore lost but empty directories we had with SVN. 2017-10-04 10:28:36 +02:00
bgfx Add .keep guard files in order to restore lost but empty directories we had with SVN. 2017-10-04 10:28:36 +02:00
bootdata [BOOTDATA] Fix LiveCD autorun (#7282) 2024-08-30 10:16:31 +03:00
environ [ROSLOAD] Use CmCheckRegistry to purge volatile data 2023-11-19 20:44:28 +01:00
freeldr [FREELDR] fs.c: Simplify FileId checks; add missing DeviceId invalidation (#7385) 2024-10-01 22:14:01 +02:00
rtl [CMAKE] Elimitate the use of GCC and CLANG variables 2022-05-27 01:37:34 +03:00
boot_images.cmake Revert "[BOOT] Don't create CSIDL_ADMINTOOLS folder in initial (#6551)" (#7017) 2024-06-14 11:08:14 +09:00
CMakeLists.txt [BOOT][SDK:RTL] Compile a reduced RTL library for FreeLdr / NT bootloader... 2022-04-07 03:19:09 +02:00