std: sys: pal: uefi: os: Implement split_paths#151991
std: sys: pal: uefi: os: Implement split_paths#151991Ayush1325 wants to merge 2 commits intorust-lang:mainfrom
Conversation
|
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
This comment has been minimized.
This comment has been minimized.
2ac9b50 to
8cc279c
Compare
There was a problem hiding this comment.
It would be good to add a split_paths_uefi test in this file:
Line 27 in 286fbe5
library/std/src/sys/pal/uefi/os.rs
Outdated
| pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> { | ||
| panic!("unsupported") | ||
| pub fn split_paths(unparsed: &OsStr) -> SplitPaths<'_> { | ||
| SplitPaths(unparsed.encode_wide()) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
8cc279c to
eb41d36
Compare
- Add test for split_paths for UEFI target. - `;` is the path separator. Escaping is not supported. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Added. |
|
☔ The latest upstream changes (presumably #153047) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot label +O-UEFI
cc @nicholasbishop