Skip to content

Commit

Permalink
Shell Dynamic Command Protocol
Browse files Browse the repository at this point in the history
Defined in UEFI Shell Specification, Section 2.4

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
  • Loading branch information
Ayush1325 authored and dvdhrm committed Dec 20, 2022
1 parent e5dceda commit f5ddfb8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/protocols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub mod mp_services;
pub mod rng;
pub mod service_binding;
pub mod shell;
pub mod shell_dynamic_command;
pub mod shell_parameters;
pub mod simple_file_system;
pub mod simple_network;
Expand Down
33 changes: 33 additions & 0 deletions src/protocols/shell_dynamic_command.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//! Shell Dynamic Command Protocol
//!
//! Defined in UEFI Shell Specification, Section 2.4
use super::{shell, shell_parameters};

pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
0x3c7200e9,
0x005f,
0x4ea4,
0x87,
0xde,
&[0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3],
);

pub type CommandHandler = eficall! {fn(
*mut Protocol,
*mut crate::system::SystemTable,
*mut shell_parameters::Protocol,
*mut shell::Protocol,
) -> crate::base::Status};

pub type CommandGetHelp = eficall! {fn(
*mut Protocol,
*mut crate::base::Char8,
) -> crate::base::Status};

#[repr(C)]
pub struct Protocol {
pub command_name: *mut crate::base::Char16,
pub handler: CommandHandler,
pub get_help: CommandGetHelp,
}

0 comments on commit f5ddfb8

Please sign in to comment.