Skip to content

Conversation

HBelusca
Copy link
Contributor

@HBelusca HBelusca commented Oct 9, 2025

Purpose & Proposed changes

Add support for all the supported filesystems: FAT/FATX, NTFS, ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:

  • Add FILEATTRIBUTES enumeration;
  • Remove non-existing CreateReadOnly and SupersedeReadOnly OPENMODE values; add missing CreateReadWrite.

This PR depends on PR #8413 feature.

@HBelusca HBelusca self-assigned this Oct 9, 2025
@HBelusca HBelusca added enhancement For PRs with an enhancement/new feature. freeldr Freeloader changes labels Oct 9, 2025
@HBelusca
Copy link
Contributor Author

HBelusca commented Oct 9, 2025

Cc @disean and @iLauncherDev too for review!

HBelusca added a commit to HBelusca/reactos that referenced this pull request Oct 9, 2025
…gth, and Attributes for filesystems (reactos#8420)

Add support for all the supported filesystems: FAT/FATX, NTFS,
ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:
- Add `FILEATTRIBUTES` enumeration;
- Remove non-existing `CreateReadOnly` and `SupersedeReadOnly`
  `OPENMODE` values; add missing `CreateReadWrite`.
@HBelusca HBelusca force-pushed the freeldr_arc_information_filename_filesystems branch from 21db845 to 5f11296 Compare October 9, 2025 20:14
HBelusca added a commit to HBelusca/reactos that referenced this pull request Oct 9, 2025
…gth, and Attributes for filesystems (reactos#8420)

Add support for all the supported filesystems: FAT/FATX, NTFS,
ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:
- Add `FILEATTRIBUTES` enumeration;
- Remove non-existing `CreateReadOnly` and `SupersedeReadOnly`
  `OPENMODE` values; add missing `CreateReadWrite`.
@HBelusca HBelusca force-pushed the freeldr_arc_information_filename_filesystems branch from 5f11296 to ac3965d Compare October 9, 2025 20:20
HBelusca added a commit to HBelusca/reactos that referenced this pull request Oct 10, 2025
…gth, and Attributes for filesystems (reactos#8420)

Add support for all the supported filesystems: FAT/FATX, NTFS,
ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:
- Add `FILEATTRIBUTES` enumeration;
- Remove non-existing `CreateReadOnly` and `SupersedeReadOnly`
  `OPENMODE` values; add missing `CreateReadWrite`.
@HBelusca HBelusca force-pushed the freeldr_arc_information_filename_filesystems branch from ac3965d to 63e0f9d Compare October 10, 2025 14:20
HBelusca added a commit to HBelusca/reactos that referenced this pull request Oct 10, 2025
…gth, and Attributes for filesystems (reactos#8420)

CORE-9023

Add support for all the supported filesystems: FAT/FATX, NTFS,
ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:
- Add `FILEATTRIBUTES` enumeration;
- Remove non-existing `CreateReadOnly` and `SupersedeReadOnly`
  `OPENMODE` values; add missing `CreateReadWrite`.
@HBelusca HBelusca force-pushed the freeldr_arc_information_filename_filesystems branch from 63e0f9d to dd114c7 Compare October 10, 2025 15:06
HBelusca added a commit to HBelusca/reactos that referenced this pull request Oct 12, 2025
… and Attributes for filesystems (reactos#8420)

CORE-9023

Add support for all the supported filesystems: FAT/FATX, NTFS,
ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:
- Add `FILEATTRIBUTES` enumeration;
- Remove non-existing `CreateReadOnly` and `SupersedeReadOnly`
  `OPENMODE` values; add missing `CreateReadWrite`.
@HBelusca HBelusca force-pushed the freeldr_arc_information_filename_filesystems branch from dd114c7 to 6f23e38 Compare October 12, 2025 16:30
@HBelusca HBelusca requested a review from disean October 12, 2025 16:31
@HBelusca
Copy link
Contributor Author

@disean please recheck :)

ULONG FileNameLength;
UCHAR Attributes;
CHAR Filename[32];
CHAR FileName[32];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CHAR FileName[32];
_Field_z_ CHAR FileName[32];

I'd suggest using an explicit annotation that FileName is a null-terminated string. Note that the spec uses a lowercase spelling style for the field.

Copy link
Contributor Author

@HBelusca HBelusca Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec has also some errors/inconsistencies too. One example (amongst many others) is the claim that this buffer is NULL-terminated even if it's counted. To be sure I add the NUL-terminator (as you've seen), but I have seen other code where the usage of the returned data wasn't assumed to be NUL-terminated.
(Regarding the casing of the name, it's now consistent with the "FileNameLength" field, and I based myself on debug symbols from some ARC binaries from MS / firmware. Additionally, if I were to follow them, names of other types would be slightly modified, like FILE_INFORMATION, etc.)

… and Attributes for filesystems (reactos#8420)

CORE-9023

Add support for all the supported filesystems: FAT/FATX, NTFS,
ISO, EXT, BTRFS, as well as for files loaded via PXE.

arc.h:
- Add `FILEATTRIBUTES` enumeration;
- Remove non-existing `CreateReadOnly` and `SupersedeReadOnly`
  `OPENMODE` values; add missing `CreateReadWrite`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement For PRs with an enhancement/new feature. freeldr Freeloader changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants