diff mbox

[U-Boot] x86: ifdtool: Separate out filenames for -D and -i

Message ID 1418535063-5580-1-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Dec. 14, 2014, 5:31 a.m. UTC
To allow these options to be specified together, separate them out.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/ifdtool.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Simon Glass Dec. 16, 2014, 4:27 a.m. UTC | #1
On 13 December 2014 at 22:31, Simon Glass <sjg@chromium.org> wrote:
>
> To allow these options to be specified together, separate them out.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  tools/ifdtool.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>

Applied to u-boot-x86.
diff mbox

Patch

diff --git a/tools/ifdtool.c b/tools/ifdtool.c
index a4b481f..09f33a8 100644
--- a/tools/ifdtool.c
+++ b/tools/ifdtool.c
@@ -778,8 +778,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 = 0;
@@ -820,14 +820,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);
 			}
@@ -997,10 +997,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)
 		ret = write_data(image, size, addr, src_fname);