futility: updater: decide if we can use diff-image by programmer

Previously we decide if the flash command can use the image_current as
the diff image by comparing if the target image pointer is identical to
the host image to write (cfg->image). This may not work properly if we
try to write a temporary firmware image object loaded separately.
A more correct way to is check if the image has the same programmer from
the diff image (e.g., image_current).

BUG=b:221137867
TEST=build and run futility tests.
BRANCH=None

Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: Iee61cd9b47c0db4b87001bbb348f95a89495b975
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3490386
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
1 file changed