Skip to content

Commit 12fded1

Browse files
GuEe-GUIRbb666
authored andcommitted
[DM/FDT] Fixup earlycon loss old messages.
The `rt_fdt_scan_chosen_stdout` will init fdt_earlycon data without `msg` only, the `msg_idx` should not clean, too. Because we check if have old messages by `msg_idx` Signed-off-by: GuEe-GUI <[email protected]>
1 parent d3d33ff commit 12fded1

File tree

1 file changed

+1
-1
lines changed
  • components/drivers/ofw

1 file changed

+1
-1
lines changed

Diff for: components/drivers/ofw/fdt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ rt_err_t rt_fdt_scan_chosen_stdout(void)
593593
int len, options_len = 0;
594594
const char *options = RT_NULL, *con_type = RT_NULL;
595595

596-
rt_memset(&fdt_earlycon, 0, sizeof(fdt_earlycon) - sizeof(fdt_earlycon.msg));
596+
rt_memset(&fdt_earlycon, 0, rt_offsetof(struct rt_fdt_earlycon, msg_idx));
597597
fdt_earlycon.nodeoffset = -1;
598598

599599
offset = fdt_path_offset(_fdt, "/chosen");

0 commit comments

Comments
 (0)