From: Kumar Gala Date: Fri, 15 Aug 2008 08:24:35 -0500 Subject: [U-Boot] [PATCH 05/15] fdt: fdt addr w/o any args reports back the current working address In-Reply-To: <1218806685-3615-4-git-send-email-galak@kernel.crashing.org> References: <1218806685-3615-1-git-send-email-galak@kernel.crashing.org> <1218806685-3615-2-git-send-email-galak@kernel.crashing.org> <1218806685-3615-3-git-send-email-galak@kernel.crashing.org> <1218806685-3615-4-git-send-email-galak@kernel.crashing.org> Message-ID: <1218806685-3615-5-git-send-email-galak@kernel.crashing.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Kumar Gala --- common/cmd_fdt.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index 436fec9..c129993 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -67,6 +67,14 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) /* * Set the address [and length] of the fdt. */ + if (argc == 2) { + if (!fdt_valid()) { + return 1; + } + printf("The address of the fdt is %p\n", working_fdt); + return 0; + } + working_fdt = (struct fdt_header *)simple_strtoul(argv[2], NULL, 16); if (!fdt_valid()) { -- 1.5.5.1