Skip to content

Comments

std: sys: pal: uefi: os: Implement split_paths#151991

Open
Ayush1325 wants to merge 2 commits intorust-lang:mainfrom
Ayush1325:uefi-split-path
Open

std: sys: pal: uefi: os: Implement split_paths#151991
Ayush1325 wants to merge 2 commits intorust-lang:mainfrom
Ayush1325:uefi-split-path

Conversation

@Ayush1325
Copy link
Contributor

@Ayush1325 Ayush1325 commented Feb 2, 2026

  • Tested using OVMF on QEMU

@rustbot label +O-UEFI
cc @nicholasbishop

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 2, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 2, 2026

r? @ChrisDenton

rustbot has assigned @ChrisDenton.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@nicholasbishop nicholasbishop left a comment

Choose a reason for hiding this comment

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

It would be good to add a split_paths_uefi test in this file:

fn split_paths_windows() {

View changes since this review

pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> {
panic!("unsupported")
pub fn split_paths(unparsed: &OsStr) -> SplitPaths<'_> {
SplitPaths(unparsed.encode_wide())
Copy link
Contributor

Choose a reason for hiding this comment

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

Using the split_paths_unix and split_paths_windows tests for comparison, I noticed an issue with the way the UEFI implementation handles empty paths. The Unix and Windows implementations map "" to [""] and ";;" to ["", "", ""], but the UEFI implementation returns an empty iterator for both. We should probably make the UEFI behavior match Unix/Windows here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Handling things the same way as windows, just without the quote escaping support.

- Based on Windows implementation. Just removed support for quote
  escaping since that is not supported in UEFI.
- Tested using OVMF on QEMU

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
- Add test for split_paths for UEFI target.
- `;` is the path separator. Escaping is not supported.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
@Ayush1325
Copy link
Contributor Author

It would be good to add a split_paths_uefi test in this file:

fn split_paths_windows() {

View changes since this review

Added.

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 24, 2026

☔ The latest upstream changes (presumably #153047) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-UEFI UEFI S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants