@@ -47,6 +47,8 @@ use crate::chromium_ec::{CrosEcDriver, EcError, EcResult};
4747use crate :: csme;
4848use crate :: ec_binary;
4949use crate :: esrt:: { self , ResourceType } ;
50+ #[ cfg( feature = "uefi" ) ]
51+ use crate :: fw_uefi:: enable_page_break;
5052#[ cfg( feature = "rusb" ) ]
5153use crate :: inputmodule:: check_inputmodule_version;
5254#[ cfg( target_os = "linux" ) ]
@@ -61,8 +63,6 @@ use crate::smbios::{dmidecode_string_val, get_smbios, is_framework};
6163use crate :: touchpad:: print_touchpad_fw_ver;
6264#[ cfg( feature = "hidapi" ) ]
6365use crate :: touchscreen;
64- #[ cfg( feature = "uefi" ) ]
65- use crate :: uefi:: enable_page_break;
6666#[ cfg( feature = "rusb" ) ]
6767use crate :: usbhub:: check_usbhub_version;
6868use crate :: util:: { self , Config , Platform , PlatformFamily } ;
@@ -1047,7 +1047,7 @@ fn print_esrt() {
10471047
10481048fn flash_ec ( ec : & CrosEc , ec_bin_path : & str , flash_type : EcFlashType , dry_run : bool ) {
10491049 #[ cfg( feature = "uefi" ) ]
1050- let data = crate :: uefi :: fs:: shell_read_file ( ec_bin_path) ;
1050+ let data = crate :: fw_uefi :: fs:: shell_read_file ( ec_bin_path) ;
10511051 #[ cfg( not( feature = "uefi" ) ) ]
10521052 let data: Option < Vec < u8 > > = {
10531053 match fs:: read ( ec_bin_path) {
@@ -1082,7 +1082,7 @@ fn dump_ec_flash(ec: &CrosEc, dump_path: &str) {
10821082 }
10831083 #[ cfg( feature = "uefi" ) ]
10841084 {
1085- let ret = crate :: uefi :: fs:: shell_write_file ( dump_path, & flash_bin) ;
1085+ let ret = crate :: fw_uefi :: fs:: shell_write_file ( dump_path, & flash_bin) ;
10861086 if ret. is_err ( ) {
10871087 println ! ( "Failed to dump EC FW image." ) ;
10881088 }
@@ -1147,7 +1147,7 @@ fn dump_dgpu_eeprom(ec: &CrosEc, dump_path: &str) {
11471147 }
11481148 #[ cfg( feature = "uefi" ) ]
11491149 {
1150- if let Err ( err) = crate :: uefi :: fs:: shell_write_file ( dump_path, & flash_bin) {
1150+ if let Err ( err) = crate :: fw_uefi :: fs:: shell_write_file ( dump_path, & flash_bin) {
11511151 error ! ( "Failed to dump EC FW image: {:?}" , err) ;
11521152 return ;
11531153 }
@@ -1616,7 +1616,7 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
16161616 }
16171617 } else if let Some ( pd_bin_path) = & args. pd_bin {
16181618 #[ cfg( feature = "uefi" ) ]
1619- let data: Option < Vec < u8 > > = crate :: uefi :: fs:: shell_read_file ( pd_bin_path) ;
1619+ let data: Option < Vec < u8 > > = crate :: fw_uefi :: fs:: shell_read_file ( pd_bin_path) ;
16201620 #[ cfg( not( feature = "uefi" ) ) ]
16211621 let data = match fs:: read ( pd_bin_path) {
16221622 Ok ( data) => Some ( data) ,
@@ -1635,7 +1635,7 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
16351635 }
16361636 } else if let Some ( ec_bin_path) = & args. ec_bin {
16371637 #[ cfg( feature = "uefi" ) ]
1638- let data: Option < Vec < u8 > > = crate :: uefi :: fs:: shell_read_file ( ec_bin_path) ;
1638+ let data: Option < Vec < u8 > > = crate :: fw_uefi :: fs:: shell_read_file ( ec_bin_path) ;
16391639 #[ cfg( not( feature = "uefi" ) ) ]
16401640 let data = match fs:: read ( ec_bin_path) {
16411641 Ok ( data) => Some ( data) ,
@@ -1654,7 +1654,7 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
16541654 }
16551655 } else if let Some ( capsule_path) = & args. capsule {
16561656 #[ cfg( feature = "uefi" ) ]
1657- let data: Option < Vec < u8 > > = crate :: uefi :: fs:: shell_read_file ( capsule_path) ;
1657+ let data: Option < Vec < u8 > > = crate :: fw_uefi :: fs:: shell_read_file ( capsule_path) ;
16581658 #[ cfg( not( feature = "uefi" ) ) ]
16591659 let data = match fs:: read ( capsule_path) {
16601660 Ok ( data) => Some ( data) ,
@@ -1683,7 +1683,7 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
16831683 }
16841684 } else if let Some ( capsule_path) = & args. h2o_capsule {
16851685 #[ cfg( feature = "uefi" ) ]
1686- let data = crate :: uefi :: fs:: shell_read_file ( capsule_path) ;
1686+ let data = crate :: fw_uefi :: fs:: shell_read_file ( capsule_path) ;
16871687 #[ cfg( not( feature = "uefi" ) ) ]
16881688 let data = match fs:: read ( capsule_path) {
16891689 Ok ( data) => Some ( data) ,
@@ -1736,7 +1736,7 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
17361736 } else if let Some ( hash_file) = & args. hash {
17371737 println ! ( "Hashing file: {}" , hash_file) ;
17381738 #[ cfg( feature = "uefi" ) ]
1739- let data = crate :: uefi :: fs:: shell_read_file ( hash_file) ;
1739+ let data = crate :: fw_uefi :: fs:: shell_read_file ( hash_file) ;
17401740 #[ cfg( not( feature = "uefi" ) ) ]
17411741 let data = match fs:: read ( hash_file) {
17421742 Ok ( data) => Some ( data) ,
@@ -1765,7 +1765,7 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
17651765 Some ( PlatformFamily :: Framework16 ) | None
17661766 ) {
17671767 #[ cfg( feature = "uefi" ) ]
1768- let data: Option < Vec < u8 > > = crate :: uefi :: fs:: shell_read_file ( gpu_descriptor_file) ;
1768+ let data: Option < Vec < u8 > > = crate :: fw_uefi :: fs:: shell_read_file ( gpu_descriptor_file) ;
17691769 #[ cfg( not( feature = "uefi" ) ) ]
17701770 let data = match fs:: read ( gpu_descriptor_file) {
17711771 Ok ( data) => Some ( data) ,
@@ -2156,7 +2156,7 @@ fn smbios_info() {
21562156fn me_info ( verbose : bool , dump_path : Option < & str > ) {
21572157 let smbios = if let Some ( path) = dump_path {
21582158 #[ cfg( feature = "uefi" ) ]
2159- let data: Option < Vec < u8 > > = crate :: uefi :: fs:: shell_read_file ( path) ;
2159+ let data: Option < Vec < u8 > > = crate :: fw_uefi :: fs:: shell_read_file ( path) ;
21602160 #[ cfg( not( feature = "uefi" ) ) ]
21612161 let data = match std:: fs:: read ( path) {
21622162 Ok ( data) => Some ( data) ,
0 commit comments