45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
--- kbd-1.12/src/kdfontop.c.orig 2007-08-21 19:28:47.000000000 +0200
|
|
+++ kbd-1.12/src/kdfontop.c 2007-08-21 19:32:50.000000000 +0200
|
|
@@ -268,26 +268,19 @@
|
|
return 0;
|
|
}
|
|
|
|
- /* Second attempt: PIO_FONTX */
|
|
- cfd.charcount = count;
|
|
- cfd.charheight = height;
|
|
- cfd.chardata = buf;
|
|
- i = ioctl(fd, PIO_FONTX, &cfd);
|
|
- if (i == 0)
|
|
- return 0;
|
|
- if (errno != ENOSYS && errno != EINVAL) {
|
|
- fprintf(stderr, "%s: putfont: %d,%dx%d:failed: %d\n", progname, count, width, height, i);
|
|
- perror("putfont: PIO_FONTX");
|
|
- return -1;
|
|
- }
|
|
-
|
|
- /* Third attempt: PIO_FONT */
|
|
- /* This will load precisely 256 chars, independent of count */
|
|
- i = ioctl(fd, PIO_FONT, buf);
|
|
- if (i) {
|
|
- fprintf(stderr, "%s: putfont: %d,%dx%d: failed: %d\n", progname, count, width, height, i);
|
|
- perror("putfont: PIO_FONT");
|
|
- return -1;
|
|
- }
|
|
- return 0;
|
|
+ // We no longer try PIO_FONT* calls.
|
|
+ // A former patch even added a possible 5 seconds delay loop here, in an attempt to
|
|
+ // gain victory over kdm. We no do this fight, as it can only result in races.
|
|
+ // https://bugzilla.novell.com/show_bug.cgi?id=302010
|
|
+ //
|
|
+ // Two effects:
|
|
+ // a) Without the delay loop, we are fast enough to run early.
|
|
+ // Moving setfont calls to an earlier point most likly
|
|
+ // avoids the race.
|
|
+ // b) Without the old compat calls, it should be easier to
|
|
+ // fix this in kernel side.
|
|
+ //
|
|
+ fprintf(stderr, "%s: putfont: %d,%dx%d: failed: %d\n", progname, count, width, height, i);
|
|
+ perror("putfont: KDFONTOP");
|
|
+ return -1;
|
|
}
|