From owner-freebsd-current Tue Oct 10 20:33:28 2000 Delivered-To: freebsd-current@freebsd.org Received: from lavender.sanpei.org (nat06.st.keio.ac.jp [131.113.17.16]) by hub.freebsd.org (Postfix) with ESMTP id 8C5FB37B502; Tue, 10 Oct 2000 20:33:19 -0700 (PDT) Received: (from sanpei@localhost) by lavender.sanpei.org (8.11.0/3.7W) id e9B3XBP05435; Wed, 11 Oct 2000 12:33:11 +0900 (JST) Message-Id: <200010110333.e9B3XBP05435@lavender.sanpei.org> To: current@FreeBSD.org Cc: jkh@FreeBSD.org Subject: [Patch] card_irq was confused in release/sysinstall/pccard.c In-Reply-To: Your message of "Tue, 10 Oct 2000 12:42:09 +0900" X-Mailer: Mew version 1.70 on Emacs 19.34.1 / Mule 2.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 11 Oct 2000 12:33:06 +0900 From: MIHIRA Sanpei Yoshiro Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I found card_irq was confused in release/sysinstall/pccard. In Some code, card_irq was used in global variable(variable_set2), and in others, char pointer.... and never set -i option for pccardd in installation time. 139 char *card_irq = ""; <--- char * 190 /* get card_irq out of CardIrq somehow */ 191 if (CardIrq) { 192 for (i = 0; i < IRQ_COUNT; i++) { 193 if ((CardIrq & IrqTable[i].my_bit) != 0) { 194 sprintf(temp, "%s %s", card_irq, IrqTable[i].my_flag); ~~~~~~~~ char * 195 variable_set2("card_irq", temp, 1); <-- global!! 196 } 197 } 198 } 237 strcat(pccardd_cmd, card_irq); <-- char * 240 variable_set2("pccardd_flags", card_irq, 1); <-- char * I think we need to fix like this. --- MIHIRA, Sanpei Yoshiro Yokohama, Japan. --- release/sysinstall/pccard.c.org Tue Oct 10 12:35:09 2000 +++ release/sysinstall/pccard.c Tue Oct 10 12:36:24 2000 @@ -136,7 +136,7 @@ int pcic_mem = 0xd0000; int beep_newstat; char card_device[16]; - char *card_irq = ""; + char card_irq[256] = ""; char temp[256]; char *spcic_mem; char pccardd_cmd[256]; @@ -192,7 +192,7 @@ for (i = 0; i < IRQ_COUNT; i++) { if ((CardIrq & IrqTable[i].my_bit) != 0) { sprintf(temp, "%s %s", card_irq, IrqTable[i].my_flag); - variable_set2("card_irq", temp, 1); + strcpy(card_irq, temp); } } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message