[U-Boot-Users] [PATCH 2/3][UPDATED] Make no options to fdt print default to '/'

Signed-off-by: Kumar Gala galak@kernel.crashing.org --- Note: these patches are also available at: git.kernel.org:/pub/scm/boot/u-boot/galak/u-boot.git libfdt
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 571b8f1..8993a27 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
participants (1)
-
Kumar Gala