Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2000 12:33:06 +0900
From:      MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
To:        current@FreeBSD.org
Cc:        jkh@FreeBSD.org
Subject:   [Patch] card_irq was confused in release/sysinstall/pccard.c
Message-ID:  <200010110333.e9B3XBP05435@lavender.sanpei.org>
In-Reply-To: Your message of "Tue, 10 Oct 2000 12:42:09 %2B0900"

next in thread | raw e-mail | index | archive | help
  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010110333.e9B3XBP05435>