Skip to content
Snippets Groups Projects
Commit f738b4a7 authored by Kumar Gala's avatar Kumar Gala
Browse files

Make no options to fdt print default to '/'

parent a3c2933e
No related branches found
No related tags found
No related merge requests found
...@@ -229,6 +229,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ...@@ -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,7 +242,10 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ...@@ -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, * 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.
*/ */
pathp = argv[2]; if (argc == 2)
pathp = root;
else
pathp = argv[2];
if (argc > 3) if (argc > 3)
prop = argv[3]; prop = argv[3];
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment