Module Name:    src
Committed By:   tsutsui
Date:           Mon Apr 29 17:25:11 UTC 2024

Modified Files:
        src/sys/arch/hp300/dev: diofb.c

Log Message:
Fix MD allocattr to return proper attributes what MI rasops(9) expects.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp300/dev/diofb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diofb.c
diff -u src/sys/arch/hp300/dev/diofb.c:1.8 src/sys/arch/hp300/dev/diofb.c:1.9
--- src/sys/arch/hp300/dev/diofb.c:1.8	Mon Apr 29 15:34:57 2024
+++ src/sys/arch/hp300/dev/diofb.c	Mon Apr 29 17:25:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofb.c,v 1.8 2024/04/29 15:34:57 tsutsui Exp $	*/
+/*	$NetBSD: diofb.c,v 1.9 2024/04/29 17:25:11 tsutsui Exp $	*/
 /*	$OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $	*/
 
 /*
@@ -351,9 +351,7 @@ diofb_allocattr(void *cookie, int fg, in
 		bg = swap;
 	}
 
-	flg = ((flg & WSATTR_UNDERLINE) ? 1 : 0);
-
-	*attr = (bg << 16) | (fg << 24) | flg;
+	*attr = (bg << 16) | (fg << 24) | (flg & WSATTR_UNDERLINE);
 
 	return 0;
 }

Reply via email to