File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
framework_lib/src/commandline Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -2138,13 +2138,17 @@ fn smbios_info() {
21382138
21392139fn me_info ( verbose : bool , dump_path : Option < & str > ) {
21402140 let smbios = if let Some ( path) = dump_path {
2141- match std:: fs:: read ( path) {
2142- Ok ( data) => Some ( smbioslib:: SMBiosData :: from_vec_and_version ( data, None ) ) ,
2141+ #[ cfg( feature = "uefi" ) ]
2142+ let data: Option < Vec < u8 > > = crate :: uefi:: fs:: shell_read_file ( path) ;
2143+ #[ cfg( not( feature = "uefi" ) ) ]
2144+ let data = match std:: fs:: read ( path) {
2145+ Ok ( data) => Some ( data) ,
21432146 Err ( e) => {
21442147 error ! ( "Failed to read SMBIOS dump file '{}': {}" , path, e) ;
2145- return ;
2148+ None
21462149 }
2147- }
2150+ } ;
2151+ data. map ( |d| smbioslib:: SMBiosData :: from_vec_and_version ( d, None ) )
21482152 } else {
21492153 get_smbios ( )
21502154 } ;
Original file line number Diff line number Diff line change @@ -225,7 +225,11 @@ pub fn parse(args: &[String]) -> Cli {
225225 cli. info = true ;
226226 found_an_option = true ;
227227 } else if arg == "--meinfo" {
228- cli. meinfo = Some ( String :: new ( ) ) ;
228+ cli. meinfo = if args. len ( ) > i + 1 {
229+ Some ( Some ( args[ i + 1 ] . clone ( ) ) )
230+ } else {
231+ Some ( None )
232+ } ;
229233 found_an_option = true ;
230234 } else if arg == "--intrusion" {
231235 cli. intrusion = true ;
You can’t perform that action at this time.
0 commit comments