coreboot-kgpe-d16/util/amdfwtool
Karthikeyan Ramasubramanian 0dd3cf4534 util/amdfwtool/amdfwread: Fix incorrect option index
index I/O argument to getopt_long is not the index to argv. Instead it
is an index into the optlong array corresponding to the parsed option.
Also getopt() uses a global variable optind to track the index of the
next argument to be processed. Use the optindex variable as an index to
extract the filename from argv.

BUG=None
TEST=Build and use amdfwread to read the Soft-fuse bits from Guybrush
BIOS image. Observed no changes before and after the changes.

Change-Id: I33c74a0c8e12c5af76954524cf7294b7541d286b
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66553
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-04 17:06:21 +00:00
..
.gitignore util/amdfwtool: Add amdfwread utility 2022-05-13 15:51:37 +00:00
Makefile util/amdfwtool: Add amdfwread utility 2022-05-13 15:51:37 +00:00
Makefile.inc
amdfwread.c util/amdfwtool/amdfwread: Fix incorrect option index 2022-09-04 17:06:21 +00:00
amdfwtool.c amdfwtool: Fix indentation 2022-08-29 22:52:59 +00:00
amdfwtool.h util/amdfwtool: Add changes to reserve BIOS SIG 2022-08-26 16:04:51 +00:00
data_parse.c util/amdfwtool: Add IKEK key for Trusted Application 2022-05-05 14:48:31 +00:00
description.md