projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3c2933
)
Make no options to fdt print default to '/'
author
Kumar Gala
<galak@kernel.crashing.org>
Thu, 25 Oct 2007 21:15:07 +0000
(16:15 -0500)
committer
Kumar Gala
<galak@kernel.crashing.org>
Wed, 21 Nov 2007 20:01:49 +0000
(14:01 -0600)
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
common/cmd_fdt.c
patch
|
blob
|
history
diff --git
a/common/cmd_fdt.c
b/common/cmd_fdt.c
index
f18c583
..
b665bd6
100644
(file)
--- a/
common/cmd_fdt.c
+++ b/
common/cmd_fdt.c
@@
-229,6
+229,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
@@
-241,7
+242,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