1
Fork 0
rust/library/std/src/sys
Ayush Singh c1790b14bc
uefi: Implement path
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.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-01-16 10:19:22 +05:30
..
alloc Revert using HEAP static in Windows alloc 2024-10-18 11:11:38 +00:00
anonymous_pipe Remove unneeded pub(crate) 2024-07-31 13:45:14 +00:00
os_str Make CloneToUninit dyn-compatible 2024-11-12 15:08:41 -06:00
pal uefi: Implement path 2025-01-16 10:19:22 +05:30
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