Date: Sun, 13 May 2001 17:13:01 +0200 (SAT) From: John Hay <jhay@icomtek.csir.co.za> To: sobomax@FreeBSD.ORG Cc: current@FreeBSD.ORG Subject: Re: Re: -CURRENT b0rked? Message-ID: <200105131513.f4DFD2l91900@zibbi.icomtek.csir.co.za> In-Reply-To: <200105130942.f4D9gIP84726@zibbi.icomtek.csir.co.za> from John Hay at "May 13, 2001 11:42:18 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> > >
> > > 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 -- John.Hay@icomtek.csir.co.za
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);
+ }
for (i=0; prefix[i]; i++)
for (j=0; postfix[j]; j++) {
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105131513.f4DFD2l91900>
