diff mbox

[U-Boot,6/6] pxe: additionaly check for fdt_file env variable

Message ID 1395353581-5839-7-git-send-email-dennis@ausil.us
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Dennis Gilmore March 20, 2014, 10:13 p.m. UTC
some boards have used fdt_file while others have used fdtfile to
define the name of the fdt file. If we do notget a fdtfile environment
variable, additionally check for fdt_file.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
---
 common/cmd_pxe.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Tom Rini March 21, 2014, 6:49 p.m. UTC | #1
On Thu, Mar 20, 2014 at 05:13:01PM -0500, Dennis Gilmore wrote:

> some boards have used fdt_file while others have used fdtfile to
> define the name of the fdt file. If we do notget a fdtfile environment
> variable, additionally check for fdt_file.
> 
> Signed-off-by: Dennis Gilmore <dennis@ausil.us>
> ---
>  common/cmd_pxe.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
> index 3483328..c58e471 100644
> --- a/common/cmd_pxe.c
> +++ b/common/cmd_pxe.c
> @@ -712,6 +712,13 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
>  			char *f1, *f2, *f3, *f4, *slash;
>  
>  			f1 = getenv("fdtfile");
> +			/*
> +			 * some boards have used fdt_file as the environment variable for
> +			 * defining the device tree file so lets check for fdt_file also.
> +			 */

Correctly wrap this please, thanks.
Stephen Warren March 25, 2014, 8:45 p.m. UTC | #2
On 03/20/2014 04:13 PM, Dennis Gilmore wrote:
> some boards have used fdt_file while others have used fdtfile to
> define the name of the fdt file. If we do notget a fdtfile environment
> variable, additionally check for fdt_file.

Is this variable typically set by the user or by the default
environment? If the default environment, perhaps the variable name could
simply be changed?

Still, this change is fine by me,
Acked-by: Stephen Warren <swarren@nvidia.com

> diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
> +			if (!f1) {
> +				f1 = getenv("fdt_file");
> +			}

Doesn't checkpatch say to remove the {} there?
diff mbox

Patch

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 3483328..c58e471 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -712,6 +712,13 @@  static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
 			char *f1, *f2, *f3, *f4, *slash;
 
 			f1 = getenv("fdtfile");
+			/*
+			 * some boards have used fdt_file as the environment variable for
+			 * defining the device tree file so lets check for fdt_file also.
+			 */
+			if (!f1) {
+				f1 = getenv("fdt_file");
+			}
 			if (f1) {
 				f2 = "";
 				f3 = "";