On Tue, Jan 14, 2003 at 06:27:00PM +0100, Eduard Bloch wrote:
> #include <hallo.h>
> * Ross Vumbaca [Tue, Jan 14 2003, 09:49:53PM]:
>
> > Here's a patch which fixes the incorrect usage of "strstr" for PowerPC
> > in kbdconfig.c - which causes the wrong keyboard choices to appear on
> > non-apus PowerPC hardware.
> b) You suggest an exact opposite of the previous behaviour, and my
> judgement says that the it was right. So could you find someone to
> confirm that there was a problem and your change fix it _without_
> breaking any stuff, anywhere?
If you consider the structure following, it should be clear that this is
correct. strstr == 0 implies that non-powermacs use the keymaps_mac
choices.
| #elif #cpu (powerpc)
| if (strcmp(Arch2, "apus") == 0) {
| choices = keymaps_ami;
| nchoices = nchoices_ami;
| prefix="amiga/";
| }
| else if (strstr(Arch2, "PowerMac") != NULL) {
| choices = keymaps_mac;
| nchoices = nchoices_mac;
| prefix = "i386/";
| } else {
| choices= keymaps;
| nchoices=sizeof(keymaps)/sizeof(struct d_choices);
| prefix="i386/";
| }
In any case, to be fully anal, I tested with and without the above
change and found that the patch works as expected, whereas the current
behavior is broken. I wonder when it crept in, because I sure don't
remember seeing this behavior.
Oh well, I'll commit the patch if there are no objections, although it
means powermac boot-floppies need to be rebuilt. Fortunately, I seem to
be able to do that at the moment.
Stephen
--
Stephen R. Marenka If life's not fun, you're not doing it right!
<stephen@marenka.net>
Attachment:
pgpsjd2NMaLch.pgp
Description: PGP signature