summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/oftree.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/oftree.c b/common/oftree.c
index 19fed6b0bc..475d418849 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -98,6 +98,21 @@ void of_print_property(const void *data, int len)
}
}
+void of_print_cmdline(struct device_node *root)
+{
+ struct device_node *node = of_find_node_by_path(root, "/chosen");
+ const char *cmdline;
+
+ if (!node) {
+ printf("commandline: no /chosen node\n");
+ return;
+ }
+
+ cmdline = of_get_property(node, "bootargs", NULL);
+
+ printf("commandline: %s\n", cmdline);
+}
+
static int of_fixup_bootargs(struct device_node *root)
{
struct device_node *node;