1
Fork 0
rust/library
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 Update the explanation for why we use box_new in vec! 2025-01-12 13:17:16 -05:00
backtrace@f8cc6ac9ac Bump backtrace to 0.3.75 2025-01-03 20:16:52 -08:00
core Auto merge of #135384 - saethlin:inline-copy-from-slice, r=joboet 2025-01-12 20:16:25 +00:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubilee 2025-01-06 22:04:13 -05:00
portable-simd Bump stdarch 2024-12-24 19:00:57 +01:00
proc_macro Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
profiler_builtins compiler & tools dependencies: 2024-12-17 17:41:00 +00:00
rtstartup Let InstCombine remove Clone shims inside Clone shims 2024-07-25 15:14:42 -04:00
rustc-std-workspace-alloc
rustc-std-workspace-core update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustc-std-workspace-std
std uefi: Implement path 2025-01-16 10:19:22 +05:30
stdarch@684de0d6fe Bump stdarch 2024-12-24 19:00:57 +01:00
sysroot Make profiler_builtins an optional dependency of sysroot, not std 2024-10-17 22:08:36 +11:00
test Update thread spawn hooks. 2024-11-19 18:54:20 +01:00
unwind Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubilee 2025-01-06 22:04:13 -05:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock sync to actual dep verions of backtrace 2025-01-03 15:26:18 +03:00
Cargo.toml library: fix adler{-> 2}.debug 2025-01-05 01:40:09 +01:00