public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Make no options to fdt print default to '/'
@ 2007-10-25 21:18 Kumar Gala
  2007-10-26 11:02 ` Jerry Van Baren
  0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2007-10-25 21:18 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 common/cmd_fdt.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index b64cb91..ef17039 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -232,6 +232,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 		char *pathp;		/* path */
 		char *prop;		/* property */
 		int  ret;		/* return value */
+		static char root[2] = "/";

 		/*
 		 * list is an alias for print, but limited to 1 level
@@ -244,7 +245,10 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 		 * Get the starting path.  The root node is an oddball,
 		 * the offset is zero and has no name.
 		 */
-		pathp = argv[2];
+		if (argc == 2)
+			pathp = root;
+		else
+			pathp = argv[2];
 		if (argc > 3)
 			prop = argv[3];
 		else
-- 
1.5.2.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot-Users] [PATCH] Make no options to fdt print default to '/'
  2007-10-25 21:18 [U-Boot-Users] [PATCH] Make no options to fdt print default to '/' Kumar Gala
@ 2007-10-26 11:02 ` Jerry Van Baren
  0 siblings, 0 replies; 2+ messages in thread
From: Jerry Van Baren @ 2007-10-26 11:02 UTC (permalink / raw)
  To: u-boot

Kumar Gala wrote:
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>  common/cmd_fdt.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)

Thanks, added to the "in" basket.

gvb

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-26 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-25 21:18 [U-Boot-Users] [PATCH] Make no options to fdt print default to '/' Kumar Gala
2007-10-26 11:02 ` Jerry Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox