rust/library/std/src/sys
Matthias Krüger 55c7a02a8b
Rollup merge of #135475 - Ayush1325:uefi-absolute-path, r=jhpratt
uefi: Implement path

This PR is split off from https://github.com/rust-lang/rust/pull/135368 to reduce noise.

UEFI paths can be of 4 types:
1. Absolute Shell Path: Uses shell mappings
2. Absolute Device Path: this is what we want
3. Relative root: path relative to the current root.
4. Relative

Absolute shell path can be identified with `:` and Absolute Device path can be identified with `/`. Relative root path will start with `\`.

The algorithm is mostly taken from edk2 UEFI shell implementation and is somewhat simple. Check for the path type in order.

For Absolute Shell path, use `EFI_SHELL->GetDevicePathFromMap` to get a BorrowedDevicePath for the volume.

For Relative paths, we use the current working directory to construct the new path.

BorrowedDevicePath abstraction is needed to interact with `EFI_SHELL->GetDevicePathFromMap` which returns a Device Path Protocol with the lifetime of UEFI shell.

Absolute Shell paths cannot exist if UEFI shell is missing.

cc `@nicholasbishop`
2025-01-30 20:47:04 +01:00
..
alloc Update a bunch of comments from before wasi support was added 2025-01-24 09:25:34 +00:00
anonymous_pipe Move std::pipe::* into std::io 2025-01-17 01:30:05 +11:00
os_str Make CloneToUninit dyn-compatible 2024-11-12 15:08:41 -06:00
pal Rollup merge of #135475 - Ayush1325:uefi-absolute-path, r=jhpratt 2025-01-30 20:47:04 +01:00
path uefi: Implement path 2025-01-16 10:19:22 +05:30
personality Rollup merge of #133420 - thesummer:rtems-unwind, r=workingjubilee 2025-01-03 22:12:41 +01:00
random Use arc4random of libc for RTEMS target 2024-11-21 23:10:19 +01:00
sync Rollup merge of #134389 - rust-wasi-web:condvar-no-threads, r=m-ou-se 2025-01-08 00:52:45 -05:00
thread_local Rollup merge of #133472 - rust-wasi-web:master, r=joboet 2024-12-10 08:55:57 +01:00
backtrace.rs Improve comments for the default backtrace printer 2024-12-04 20:54:37 -05:00
cmath.rs fmt 2024-11-27 12:02:02 -05:00
exit_guard.rs Attempt to fix CI 2024-07-08 09:19:25 -05:00
mod.rs Revert Break into the debugger on panic (129019) 2024-09-25 17:53:57 +00:00