From owner-freebsd-current Sun May 13 8:13:15 2001 Delivered-To: freebsd-current@freebsd.org Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by hub.freebsd.org (Postfix) with ESMTP id DC54D37B423; Sun, 13 May 2001 08:13:05 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.11.1/8.11.1) id f4DFD2l91900; Sun, 13 May 2001 17:13:02 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200105131513.f4DFD2l91900@zibbi.icomtek.csir.co.za> Subject: Re: Re: -CURRENT b0rked? In-Reply-To: <200105130942.f4D9gIP84726@zibbi.icomtek.csir.co.za> from John Hay at "May 13, 2001 11:42:18 am" To: sobomax@FreeBSD.ORG Date: Sun, 13 May 2001 17:13:01 +0200 (SAT) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > > > > 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