Skip to content

Commit

Permalink
MIPS: FW: Fix parsing u-boot environment
Browse files Browse the repository at this point in the history
When reading u-boot's key=value pairs it should skip the '=' and not
use the next argument.

Signed-off-by: Alban Bedel <albeu@free.fr>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8357/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Alban Bedel authored and Ralf Baechle committed Nov 24, 2014
1 parent e2afb7d commit 4a792e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/fw/lib/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ char *fw_getenv(char *envname)
result = fw_envp(index + 1);
break;
} else if (fw_envp(index)[i] == '=') {
result = (fw_envp(index + 1) + i);
result = fw_envp(index) + i + 1;
break;
}
}
Expand Down

0 comments on commit 4a792e5

Please sign in to comment.