Make no options to fdt print default to '/'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
Kumar Gala 2007-10-25 16:15:07 -05:00
parent a3c2933e02
commit f738b4a759
1 changed files with 5 additions and 1 deletions

View File

@ -229,6 +229,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
char *pathp; /* path */ char *pathp; /* path */
char *prop; /* property */ char *prop; /* property */
int ret; /* return value */ int ret; /* return value */
static char root[2] = "/";
/* /*
* list is an alias for print, but limited to 1 level * list is an alias for print, but limited to 1 level
@ -241,6 +242,9 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
* Get the starting path. The root node is an oddball, * Get the starting path. The root node is an oddball,
* the offset is zero and has no name. * the offset is zero and has no name.
*/ */
if (argc == 2)
pathp = root;
else
pathp = argv[2]; pathp = argv[2];
if (argc > 3) if (argc > 3)
prop = argv[3]; prop = argv[3];