Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/stand/efiboot Fix previous.
details: https://anonhg.NetBSD.org/src/rev/b171e6cfd35a
branches: trunk
changeset: 941471:b171e6cfd35a
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Oct 22 09:28:30 2020 +0000
description:
Fix previous.
diffstat:
sys/stand/efiboot/efifdt.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diffs (36 lines):
diff -r 5f0de7e0b403 -r b171e6cfd35a sys/stand/efiboot/efifdt.c
--- a/sys/stand/efiboot/efifdt.c Thu Oct 22 09:14:40 2020 +0000
+++ b/sys/stand/efiboot/efifdt.c Thu Oct 22 09:28:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efifdt.c,v 1.26 2020/10/22 09:14:40 jmcneill Exp $ */
+/* $NetBSD: efifdt.c,v 1.27 2020/10/22 09:28:30 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jason R. Thorpe
@@ -338,21 +338,17 @@
continue;
}
- snprintf(buf, sizeof(buf), "framebuffer@%" PRIx64, mode->FrameBufferBase);
- fb = fdt_path_offset(fdt_data, buf);
- if (fb >= 0) {
- /* Framebuffer node already exists, no need to create one */
- return;
- }
-
chosen = efi_fdt_chosen();
fdt_setprop_u32(fdt_data, chosen, "#address-cells", 2);
fdt_setprop_u32(fdt_data, chosen, "#size-cells", 2);
fdt_setprop_empty(fdt_data, chosen, "ranges");
+ snprintf(buf, sizeof(buf), "framebuffer@%" PRIx64, mode->FrameBufferBase);
fb = fdt_add_subnode(fdt_data, chosen, buf);
- if (fb < 0)
- panic("FDT: Failed to create framebuffer node");
+ if (fb < 0) {
+ /* Framebuffer node already exists. No need to create a new one! */
+ return;
+ }
fdt_appendprop_string(fdt_data, fb, "compatible", "simple-framebuffer");
fdt_appendprop_string(fdt_data, fb, "status", "okay");
Home |
Main Index |
Thread Index |
Old Index