diff options
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index aeec35bc3789..fd85fa298e0f 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -681,9 +681,14 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, | |||
681 | if (p != NULL && l > 0) | 681 | if (p != NULL && l > 0) |
682 | strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); | 682 | strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); |
683 | 683 | ||
684 | /* | ||
685 | * CONFIG_CMDLINE is meant to be a default in case nothing else | ||
686 | * managed to set the command line, unless CONFIG_CMDLINE_FORCE | ||
687 | * is set in which case we override whatever was found earlier. | ||
688 | */ | ||
684 | #ifdef CONFIG_CMDLINE | 689 | #ifdef CONFIG_CMDLINE |
685 | #ifndef CONFIG_CMDLINE_FORCE | 690 | #ifndef CONFIG_CMDLINE_FORCE |
686 | if (p == NULL || l == 0 || (l == 1 && (*p) == 0)) | 691 | if (!((char *)data)[0]) |
687 | #endif | 692 | #endif |
688 | strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); | 693 | strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); |
689 | #endif /* CONFIG_CMDLINE */ | 694 | #endif /* CONFIG_CMDLINE */ |