iAmSomeone2 / bios_renamer_for_asus

Cross-platform Rust implementation of Asus' BIOS renamer utility.
MIT License
41 stars 1 forks source link

INVALID FILE: provided file is not the expected size #9

Closed aminvandh closed 11 months ago

aminvandh commented 1 year ago

i tried to convert .CAP file to .BIN for my bios: Compiling proc-macro2 v1.0.63 Compiling rustix v0.38.1 Compiling bitflags v2.3.3 Compiling quote v1.0.29 Compiling linux-raw-sys v0.4.3 Compiling unicode-ident v1.0.9 Compiling libc v0.2.147 Compiling utf8parse v0.2.1 Compiling autocfg v1.1.0 Compiling anstyle-parse v0.2.1 Compiling colorchoice v1.0.0 Compiling anstyle v1.0.1 Compiling anstyle-query v1.0.0 Compiling clap_lex v0.5.0 Compiling strsim v0.10.0 Compiling heck v0.4.1 Compiling num-traits v0.2.15 Compiling iana-time-zone v0.1.57 Compiling once_cell v1.18.0 Compiling time v0.1.45 Compiling syn v2.0.22 Compiling is-terminal v0.4.8 Compiling anstream v0.3.2 Compiling clap_builder v4.3.10 Compiling chrono v0.4.26 Compiling clap_derive v4.3.2 Compiling clap v4.3.10 Compiling bios_renamer_for_asus v0.2.0 (/bios_renamer_for_asus) warning: fieldsboard_name,brand,build_date, andbuild_numberare never read --> src/bios.rs:68:5 | 66 | pub struct BiosInfo { | -------- fields in this struct 67 | /// Name of target motherboard 68 | board_name: String, | ^^^^^^^^^^ ... 71 | brand: String, | ^^^^^ ... 74 | build_date: NaiveDate, | ^^^^^^^^^^ ... 77 | build_number: String, | ^^^^^^^^^^^^ | = note:BiosInfohas a derived impl for the traitDebug, but this is intentionally ignored during dead code analysis = note:#[warn(dead_code)]on by default

warning:bios_renamer_for_asus(bin "bios_renamer_for_asus") generated 1 warning Finished dev [unoptimized + debuginfo] target(s) in 38.27s Runningtarget/debug/bios_renamer_for_asus PRIME-A320M-K-ASUS-6064.CAP` INVALID FILE: provided file is not the expected size`

tduncan907 commented 11 months ago

tried running the program but was given a similar error

warning: fields board_name, brand, build_date, and build_number are never read --> src/bios.rs:68:5 66 pub struct BiosInfo { -------- fields in this struct 67 /// Name of target motherboard 68 board_name: String, ^^^^^^^^^^ ... 71 brand: String, ^^^^^ ... 74 build_date: NaiveDate, ^^^^^^^^^^ ... 77 build_number: String, ^^^^^^^^^^^^

= note: BiosInfo has a derived impl for the trait Debug, but this is intentionally ignored during dead code analysis = note: #[warn(dead_code)] on by default

warning: bios_renamer_for_asus (bin "bios_renamer_for_asus") generated 1 warning Finished dev [unoptimized + debuginfo] target(s) in 0.01s Running target/debug/bios_renamer_for_asus /Users/username/Desktop/bios_renamer_for_asus-main/src/P8Z77-M-PRO-ASUS-2203.CAP INVALID FILE: provided file is not the expected size

iAmSomeone2 commented 11 months ago

It sounds like some newer BIOS files are a different size than before. Prior to the current CPU socket generations, the BIOS files were all the same size. I will likely need to remove this check.