forked from AbleOS/ableos
37 lines
943 B
Rust
37 lines
943 B
Rust
use {
|
|
// crate::alloc::string::ToString,
|
|
alloc::vec::Vec,
|
|
// clparse::Arguments,
|
|
// core::fmt::{Debug, Display},
|
|
// log::trace,
|
|
// xml::XMLElement,
|
|
};
|
|
pub type BootModules<'a> = Vec<BootModule<'a>>;
|
|
|
|
pub struct BootModule<'a> {
|
|
pub path: &'a str,
|
|
pub bytes: &'a [u8],
|
|
pub cmd: &'a str,
|
|
}
|
|
impl<'a> BootModule<'a> {
|
|
pub fn new(path: &'a str, bytes: &'a [u8], cmd: &'a str) -> Self {
|
|
Self { path, bytes, cmd }
|
|
}
|
|
}
|
|
|
|
// pub fn build_cmd<T: Display + Debug>(name: T, cmdline: T) -> XMLElement {
|
|
// let mut cmdline = cmdline.to_string();
|
|
// cmdline.pop();
|
|
// cmdline.remove(0);
|
|
|
|
// let cmd = Arguments::parse(cmdline.to_string()).unwrap();
|
|
// trace!("Cmdline: {cmd:?}");
|
|
|
|
// let mut clo = XMLElement::new(name);
|
|
// for (key, value) in cmd.arguments {
|
|
// clo.set_attribute(key, value);
|
|
// }
|
|
// trace!("command line object: {:?}", clo);
|
|
// clo
|
|
// }
|