summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2016-03-29 22:06:50 +0000
committerkettenis <kettenis@openbsd.org>2016-03-29 22:06:50 +0000
commit9f777a6a78931038c46f9e39723952904f1a9786 (patch)
treed5ca516883f32f3ad6677b08db4b66b56a6a8e17
parentKdump contains LOG_CONS now. TLS error message changes. (diff)
downloadwireguard-openbsd-9f777a6a78931038c46f9e39723952904f1a9786.tar.xz
wireguard-openbsd-9f777a6a78931038c46f9e39723952904f1a9786.zip
Some sparc64 pci frame buffers incorrectly have the `depth' property
spelled `depth ' with a trailing space. From miod@
-rw-r--r--sys/arch/sparc64/dev/fb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/fb.c b/sys/arch/sparc64/dev/fb.c
index 0345f9b284e..4cc28492c86 100644
--- a/sys/arch/sparc64/dev/fb.c
+++ b/sys/arch/sparc64/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.27 2016/03/15 20:50:22 krw Exp $ */
+/* $OpenBSD: fb.c,v 1.28 2016/03/29 22:06:50 kettenis Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -131,7 +131,12 @@ fb_setsize(struct sunfb *sf, int def_depth, int def_width, int def_height,
{
int def_linebytes;
- sf->sf_depth = getpropint(node, "depth", def_depth);
+ /*
+ * Some PCI devices lack the `depth' property, but have a `depth '
+ * property (with a trailing space) instead.
+ */
+ sf->sf_depth = getpropint(node, "depth",
+ getpropint(node, "depth ", def_depth));
sf->sf_width = getpropint(node, "width", def_width);
sf->sf_height = getpropint(node, "height", def_height);