about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/query.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-30 20:47:04 +0100
committerGitHub <noreply@github.com>2025-01-30 20:47:04 +0100
commit55c7a02a8b037487e459170e405e9c4d1ea639ff (patch)
tree8ca9c44f7913d418f69be548c40679df51d56194 /compiler/rustc_mir_transform/src/coverage/query.rs
parent89f8abe8b403b8299709c97705792b2615b27182 (diff)
parentc1790b14bcd62df7bccdfa7d7fbe4533dfdcdc8c (diff)
downloadrust-55c7a02a8b037487e459170e405e9c4d1ea639ff.tar.gz
rust-55c7a02a8b037487e459170e405e9c4d1ea639ff.zip
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`
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/query.rs')
0 files changed, 0 insertions, 0 deletions