1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-31 21:57:12 +00:00
freebsd-ports/japanese/kon2-16dot/files/patch-ah
Shigeyuki Fukushima 0def7c196e Fix kon's vga/mmap code for 4-current or later with new sysncos ans vga/mmap.
# But 3.x-stable or former uses old code.
Thanks, yokota-san!

Submitted by:	Kazutaka YOKOTA <yokota@FreeBSD.org>
2000-01-31 05:47:45 +00:00

24 lines
703 B
Plaintext

--- src/display/vga.c.orig Sun Jan 26 18:05:00 1997
+++ src/display/vga.c Mon Jan 31 14:09:55 2000
@@ -382,7 +382,7 @@
/* if (!code) return;*/
VgaSetColor(fc);
if (bc & 0x8) *(vcls - dInfo.glineByte) = 0;
- for (x = 0;x < sbFReg->high;x ++, code ++, fm >>= 1) {
+ if (code) for (x = 0;x < sbFReg->high;x ++, code ++, fm >>= 1) {
if (*code) {
VgaOutByte(*code);
*gram = *gram;
@@ -620,7 +620,11 @@
Perror("ioctl CONSOLE_IO_ENABLE");
return FAILURE;
}
+#if (__FreeBSD__ <= 3)
if ((devMem = open("/dev/vga", O_RDWR|O_NDELAY) ) < 0) {
+#else
+ if ((devMem = open("/dev/mem", O_RDWR|O_NDELAY) ) < 0) {
+#endif
Perror("/dev/mem");
return FAILURE;
}