about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorAyush Singh <ayush@beagleboard.org>2025-03-18 18:09:22 +0530
committerAyush Singh <ayush@beagleboard.org>2025-03-24 08:40:07 +0530
commit0cd1d516aee85608a695d0376cdef059cc50e00a (patch)
tree9a62e312edb93f3f9f38012b65814004a90bb58a /library/std
parent7290b04b0a46de2118968aa556bfc0970aac6661 (diff)
downloadrust-0cd1d516aee85608a695d0376cdef059cc50e00a.tar.gz
rust-0cd1d516aee85608a695d0376cdef059cc50e00a.zip
std: fs: uefi: Implement canonicalize
- Should be same as absolute in UEFI since there are no symlinks.
- Also each absolute path representation should be unique according to
  the UEFI specification.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/sys/fs/uefi.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/fs/uefi.rs b/library/std/src/sys/fs/uefi.rs
index 54acd4c27b3..f7c33b7c40f 100644
--- a/library/std/src/sys/fs/uefi.rs
+++ b/library/std/src/sys/fs/uefi.rs
@@ -315,8 +315,8 @@ pub fn lstat(_p: &Path) -> io::Result<FileAttr> {
     unsupported()
 }
 
-pub fn canonicalize(_p: &Path) -> io::Result<PathBuf> {
-    unsupported()
+pub fn canonicalize(p: &Path) -> io::Result<PathBuf> {
+    crate::path::absolute(p)
 }
 
 pub fn copy(_from: &Path, _to: &Path) -> io::Result<u64> {