From f738b4a75998f42a7408defadc9baac7a31c92db Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 25 Oct 2007 16:15:07 -0500 Subject: Make no options to fdt print default to '/' Signed-off-by: Kumar Gala --- common/cmd_fdt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/cmd_fdt.c') diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index f18c583854..b665bd6c6a 100644 --- 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 -- cgit v1.2.1