aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMaxime Ripard2016-07-05 10:26:34 +0200
committerTom Rini2016-08-20 11:34:58 -0400
commitf0ed68e21f219c1bee52b73183660e5e88b06e0f (patch)
treea3189a140322f9f914f52fbc0ef52303b13cd2f4 /cmd
parent793fd86f722f5c5e13290be2074816b001359b76 (diff)
cmd: fdt: Narrow the check for fdt addr
The current code only checks if the fdt subcommand is fdt addr by checking whether it starts with 'a'. Since this is a pretty widely used letter, narrow down that check a bit. Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 898217ffe5f..0f5923e75a4 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -87,7 +87,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/*
* Set the address of the fdt
*/
- if (argv[1][0] == 'a') {
+ if (strncmp(argv[1], "ad", 2) == 0) {
unsigned long addr;
int control = 0;
struct fdt_header *blob;