Commit f738b4a75998f42a7408defadc9baac7a31c92db

Authored by Kumar Gala
1 parent a3c2933e02

Make no options to fdt print default to '/'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -229,6 +229,7 @@
229 229 char *pathp; /* path */
230 230 char *prop; /* property */
231 231 int ret; /* return value */
  232 + static char root[2] = "/";
232 233  
233 234 /*
234 235 * list is an alias for print, but limited to 1 level
... ... @@ -241,7 +242,10 @@
241 242 * Get the starting path. The root node is an oddball,
242 243 * the offset is zero and has no name.
243 244 */
244   - pathp = argv[2];
  245 + if (argc == 2)
  246 + pathp = root;
  247 + else
  248 + pathp = argv[2];
245 249 if (argc > 3)
246 250 prop = argv[3];
247 251 else