From 389d2c11573cf8cda7bea7ec03e28abb679ca8ae Mon Sep 17 00:00:00 2001 From: Adrian Chiris Date: Wed, 20 Aug 2014 14:51:55 +0300 Subject: [PATCH] ported changes from MFT-3.7.0 pt3 --- flint/cmd_line_parser.cpp | 2 +- mlxfwops/lib/fs3_ops.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/flint/cmd_line_parser.cpp b/flint/cmd_line_parser.cpp index 4c33961..1a13af0 100644 --- a/flint/cmd_line_parser.cpp +++ b/flint/cmd_line_parser.cpp @@ -741,7 +741,7 @@ ParseStatus Flint::HandleOption(string name, string value) return PARSE_OK_WITH_EXIT; } else if (name == "no_devid_check") { - _flintParams.no_devid_check = false; + _flintParams.no_devid_check = true; } else if (name == "guid") { _flintParams.guid_specified = true; diff --git a/mlxfwops/lib/fs3_ops.cpp b/mlxfwops/lib/fs3_ops.cpp index 6c12c38..c103e6e 100644 --- a/mlxfwops/lib/fs3_ops.cpp +++ b/mlxfwops/lib/fs3_ops.cpp @@ -702,6 +702,22 @@ bool Fs3Operations::Fs3Burn(Fs3Operations &imageOps, ExtBurnParams& burnParams) return false; } + // Check Matching device ID +#ifndef UEFI_BUILD // NO Device ID here.. + if (!burnParams.noDevidCheck && _ioAccess->is_flash()) { + if (imageOps._fwImgInfo.supportedHwIdNum) { + if (!CheckMatchingHwDevId(_ioAccess->get_dev_id(), + _ioAccess->get_rev_id(), + imageOps._fwImgInfo.supportedHwId, + imageOps._fwImgInfo.supportedHwIdNum)) { + return errmsg("Device/Image mismatch: %s\n",this->err( )); + } + } else { // no suppored hw ids (problem with the image ?) + return errmsg("No supported devices were found in the FW image."); + } + } +#endif + if (!burnParams.burnFailsafe) { // some checks in case we burn in a non-failsafe manner and attempt to integrate existing device // data sections from device. -- 2.46.0