Commit 7dfb172d67f8c665be7377b5507e43304166cad0
1 parent
673ed2f8c2
Exists in
v2017.01-smarct4x
and in
37 other branches
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>
Showing 1 changed file with 6 additions and 6 deletions Side-by-side Diff
tools/ifdtool.c
... | ... | @@ -779,8 +779,8 @@ |
779 | 779 | int mode_spifreq = 0, mode_em100 = 0, mode_locked = 0; |
780 | 780 | int mode_unlocked = 0, mode_write = 0, mode_write_descriptor = 0; |
781 | 781 | int create = 0; |
782 | - char *region_type_string = NULL, *src_fname = NULL; | |
783 | - char *addr_str = NULL; | |
782 | + char *region_type_string = NULL, *inject_fname = NULL; | |
783 | + char *desc_fname = NULL, *addr_str = NULL; | |
784 | 784 | int region_type = -1, inputfreq = 0; |
785 | 785 | enum spi_frequency spifreq = SPI_FREQUENCY_20MHZ; |
786 | 786 | unsigned int addr[WRITE_MAX]; |
787 | 787 | |
... | ... | @@ -823,14 +823,14 @@ |
823 | 823 | break; |
824 | 824 | case 'D': |
825 | 825 | mode_write_descriptor = 1; |
826 | - src_fname = optarg; | |
826 | + desc_fname = optarg; | |
827 | 827 | break; |
828 | 828 | case 'e': |
829 | 829 | mode_em100 = 1; |
830 | 830 | break; |
831 | 831 | case 'i': |
832 | 832 | if (get_two_words(optarg, ®ion_type_string, |
833 | - &src_fname)) { | |
833 | + &inject_fname)) { | |
834 | 834 | print_usage(argv[0]); |
835 | 835 | exit(EXIT_FAILURE); |
836 | 836 | } |
837 | 837 | |
... | ... | @@ -1008,10 +1008,10 @@ |
1008 | 1008 | } |
1009 | 1009 | |
1010 | 1010 | if (mode_write_descriptor) |
1011 | - ret = write_data(image, size, -size, src_fname); | |
1011 | + ret = write_data(image, size, -size, desc_fname); | |
1012 | 1012 | |
1013 | 1013 | if (mode_inject) |
1014 | - ret = inject_region(image, size, region_type, src_fname); | |
1014 | + ret = inject_region(image, size, region_type, inject_fname); | |
1015 | 1015 | |
1016 | 1016 | if (mode_write) { |
1017 | 1017 | for (wr_idx = 0; wr_idx < wr_num; wr_idx++) { |