John Hay wrote:
>
> > > >
> > > > It seems that sysinstall(8) was not fully integrated into
> > > > buildworld - it depends on content of /usr/share/syscons/keymaps,
> > > > while it shouldn't.
> > > >
> > > > I've just committed a patch that should fix this problem.
> >
> > You should look a little earlier in the logs to where the damage was really
> > done:
> >
> > rm -f keymap.tmp
> > for map in be.iso br275.iso danish.iso finnish.iso fr.iso german.iso hr.iso hu.
> > iso2.101keys it.iso icelandic.iso jp.106 norwegian.iso pl_PL.ISO_8859-2 pt.iso
> > ru.koi8-r si.iso spanish.iso swedish.iso swissfrench.iso swissgerman.iso ua.koi
> > 8-u ua.koi8-u.shift.alt uk.iso us.dvorak us.iso us.pc-ctrl us.unix ; do env KE
> > YMAP_PATH=/usr/src/usr.sbin/sysinstall/../../share/syscons/keymaps kbdcontrol -
> > L $map | sed -e '/^static accentmap_t/,$d' >> keymap.tmp ; done
> > Segmentation fault - core dumped
> > ...
> >
> > It looks like kbdcontrol is not very happy.
>
> Ok, here is a patch that fix the problem for me. The problem is that
> a second call to mkfullname() will reuse the memory at the pointer that
> it returns, so you have to preserve it before then.
>
> John
> --
> John Hay -- [EMAIL PROTECTED]
>
> Index: usr.sbin/kbdcontrol/kbdcontrol.c
> ===================================================================
> RCS file: /home/ncvs/src/usr.sbin/kbdcontrol/kbdcontrol.c,v
> retrieving revision 1.34
> diff -u -r1.34 kbdcontrol.c
> --- usr.sbin/kbdcontrol/kbdcontrol.c 2001/05/12 09:16:09 1.34
> +++ usr.sbin/kbdcontrol/kbdcontrol.c 2001/05/13 15:02:14
> @@ -751,8 +751,11 @@
> char *prefix[] = {"", "", KEYMAP_PATH, NULL};
> char *postfix[] = {"", ".kbd", NULL};
>
> - if (cp = getenv("KEYMAP_PATH"))
> - prefix[0] = mkfullname(cp, "/", "");
> + if (cp = getenv("KEYMAP_PATH")) {
> + cp = mkfullname(cp, "/", "");
> + prefix[0] = malloc(strlen(cp) + 1);
> + strcpy(prefix[0], cp);
Alternately:
prefix[0] = strdup(mkfullname(cp, "/", ""));
Probably you should check for failures, though...
-- Terry
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message