summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-12-13 22:25:46 -0700
committerSimon Glass <sjg@chromium.org>2014-12-13 22:32:04 -0700
commit7dfb172d67f8c665be7377b5507e43304166cad0 (patch)
treed8f122acab370f87ebd5668ec3e1e62044e09bb8 /tools
parent673ed2f8c2e6b5526de929861d7dd42834c572fd (diff)
x86: ifdtool: Separate out filenames for -D and -i
To allow these options to be specified together, separate them out. Change-Id: Ib93f11cd51eb3302127f4c82936ff2b44c88d5a2 Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/ifdtool.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/ifdtool.c b/tools/ifdtool.c
index f81e5c87c7..4a27b82c2e 100644
--- a/tools/ifdtool.c
+++ b/tools/ifdtool.c
@@ -779,8 +779,8 @@ int main(int argc, char *argv[])
int mode_spifreq = 0, mode_em100 = 0, mode_locked = 0;
int mode_unlocked = 0, mode_write = 0, mode_write_descriptor = 0;
int create = 0;
- char *region_type_string = NULL, *src_fname = NULL;
- char *addr_str = NULL;
+ char *region_type_string = NULL, *inject_fname = NULL;
+ char *desc_fname = NULL, *addr_str = NULL;
int region_type = -1, inputfreq = 0;
enum spi_frequency spifreq = SPI_FREQUENCY_20MHZ;
unsigned int addr[WRITE_MAX];
@@ -823,14 +823,14 @@ int main(int argc, char *argv[])
break;
case 'D':
mode_write_descriptor = 1;
- src_fname = optarg;
+ desc_fname = optarg;
break;
case 'e':
mode_em100 = 1;
break;
case 'i':
if (get_two_words(optarg, &region_type_string,
- &src_fname)) {
+ &inject_fname)) {
print_usage(argv[0]);
exit(EXIT_FAILURE);
}
@@ -1008,10 +1008,10 @@ int main(int argc, char *argv[])
}
if (mode_write_descriptor)
- ret = write_data(image, size, -size, src_fname);
+ ret = write_data(image, size, -size, desc_fname);
if (mode_inject)
- ret = inject_region(image, size, region_type, src_fname);
+ ret = inject_region(image, size, region_type, inject_fname);
if (mode_write) {
for (wr_idx = 0; wr_idx < wr_num; wr_idx++) {