mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
cli: Add error on missing IFD
When no IFD is present, but the option --ifd is specified, flashrom would just exit without printing a helpful error message. Add error message that IFD could not be read or parsed. Tested on Intel platform without IFD present. Change-Id: Ie1edd7f36f647c52b17799878185d1e69e10d3b0 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/33245 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
a724602fe0
commit
911b8d8bc4
@ -353,18 +353,21 @@ int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct
|
||||
msg_cinfo("done.\n");
|
||||
|
||||
if (layout_from_ich_descriptors(chip_layout, desc, 0x1000)) {
|
||||
msg_cerr("Couldn't parse the descriptor!\n");
|
||||
ret = 3;
|
||||
goto _finalize_ret;
|
||||
}
|
||||
|
||||
if (dump) {
|
||||
if (layout_from_ich_descriptors(&dump_layout, dump, len)) {
|
||||
msg_cerr("Couldn't parse the descriptor!\n");
|
||||
ret = 4;
|
||||
goto _finalize_ret;
|
||||
}
|
||||
|
||||
if (chip_layout->base.num_entries != dump_layout.base.num_entries ||
|
||||
memcmp(chip_layout->entries, dump_layout.entries, sizeof(dump_layout.entries))) {
|
||||
msg_cerr("Descriptors don't match!\n");
|
||||
ret = 5;
|
||||
goto _finalize_ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user