Skip to content

Commit

Permalink
uefi: Update FS docstring example code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasbishop committed Aug 26, 2024
1 parent 5d52fd8 commit 65bc12c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions uefi/src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
//! ```no_run
//! use uefi::CString16;
//! use uefi::fs::{FileSystem, FileSystemResult};
//! use uefi::prelude::BootServices;
//! use uefi::proto::media::fs::SimpleFileSystem;
//! use uefi::table::boot::ScopedProtocol;
//! use uefi::boot::{self, ScopedProtocol};
//!
//! fn read_file(bs: BootServices, path: &str) -> FileSystemResult<Vec<u8>> {
//! fn read_file(path: &str) -> FileSystemResult<Vec<u8>> {
//! let path: CString16 = CString16::try_from(path).unwrap();
//! let fs: ScopedProtocol<SimpleFileSystem> = bs.get_image_file_system(bs.image_handle()).unwrap();
//! let fs: ScopedProtocol<SimpleFileSystem> = boot::get_image_file_system(boot::image_handle()).unwrap();
//! let mut fs = FileSystem::new(fs);
//! fs.read(path.as_ref())
//! }
Expand Down

0 comments on commit 65bc12c

Please sign in to comment.