changed long to int (64 bit system's compatibilty)
[lcr.git] / genrc.c
diff --git a/genrc.c b/genrc.c
index 7c5089f..5dabfc1 100644 (file)
--- a/genrc.c
+++ b/genrc.c
@@ -30,16 +30,16 @@ static struct cards {
        int isac;
        int ports;
 } cards[] = {
-       { "AVM Fritz PCI (PNP)", "avmfritz", 0, 1, 1},
+//     { "AVM Fritz PCI (PNP)", "avmfritz", 0, 1, 1},
        { "HFC PCI (Cologne Chip)", "hfcpci", 1, 0, 1},
        { "HFC-4S 4 S/T Ports (Cologne Chip)", "hfcmulti", 1, 0, 4},
        { "HFC-8S 8 S/T Ports (Cologne Chip)", "hfcmulti", 1, 0, 8},
        { "HFC-E1 1 E1 Port (Cologne Chip)", "hfcmulti", 1, 0, 1},
        { "HFC-S USB (Cologne Chip)", "hfcsusb", 1, 0, 1},
-       { "HFC-S MINI (Cologne Chip)", "hfcsmini", 1, 0, 1},
-       { "XHFC (Cologne Chip)", "xhfc", 1, 0, 1},
-       { "Sedlbaur FAX", "sedlfax", 0, 1, 1},
-       { "Winbond 6692 PCI", "w6692pci", 0, 0, 1},
+//     { "HFC-S MINI (Cologne Chip)", "hfcsmini", 1, 0, 1},
+//     { "XHFC (Cologne Chip)", "xhfc", 1, 0, 1},
+//     { "Sedlbaur FAX", "sedlfax", 0, 1, 1},
+//     { "Winbond 6692 PCI", "w6692pci", 0, 0, 1},
        { NULL, NULL, 0, 0},
 };
 
@@ -50,6 +50,9 @@ int main(void)
        char input[256];
        char protocol[1024], layermask[1024], types[256];
 
+       printf("This program is outdated and requires update to mISDN V2 API\n");
+       return (0);
+
        printf("\n\nThis program generates a script, which is used to start/stop/restart mISDN\n");
        printf("driver. All configuration of cards is done for using with the LCR.\n");
 
@@ -171,14 +174,14 @@ int main(void)
        fprintf(fp, "# rc script for mISDN driver\n\n");
        fprintf(fp, "case \"$1\" in\n");
        fprintf(fp, "\tstart|--start)\n");
-       fprintf(fp, "\t\t%s %smISDN_core%s debug=0x%x\n", input[0]?"insmod -f":"modprobe", input, input[0]?".ko":"", coredebug);
+       fprintf(fp, "\t\t%s %smISDN_core%s debug=0x%x\n", input[0]?"insmod -f":"modprobe --ignore-install", input, input[0]?".ko":"", coredebug);
        if (anyte)
        {
-               fprintf(fp, "\t\t%s %smISDN_l1%s debug=0x%x\n", input[0]?"insmod -f":"modprobe", input, input[0]?".ko":"", l1debug);
-               fprintf(fp, "\t\t%s %smISDN_l2%s debug=0x%x\n", input[0]?"insmod -f":"modprobe", input, input[0]?".ko":"", l2debug);
-               fprintf(fp, "\t\t%s %sl3udss1%s debug=0x%x\n", input[0]?"insmod -f":"modprobe", input, input[0]?".ko":"", l3debug);
+               fprintf(fp, "\t\t%s %smISDN_l1%s debug=0x%x\n", input[0]?"insmod -f":"modprobe --ignore-install", input, input[0]?".ko":"", l1debug);
+               fprintf(fp, "\t\t%s %smISDN_l2%s debug=0x%x\n", input[0]?"insmod -f":"modprobe --ignore-install", input, input[0]?".ko":"", l2debug);
+               fprintf(fp, "\t\t%s %sl3udss1%s debug=0x%x\n", input[0]?"insmod -f":"modprobe --ignore-install", input, input[0]?".ko":"", l3debug);
        }
-       fprintf(fp, "\t\t%s %smISDN_dsp%s debug=0x%x options=0x%x\n", input[0]?"insmod -f":"modprobe", input, input[0]?".ko":"", dspdebug, lawopt);
+       fprintf(fp, "\t\t%s %smISDN_dsp%s debug=0x%x options=0x%x\n", input[0]?"insmod -f":"modprobe --ignore-install", input, input[0]?".ko":"", dspdebug, lawopt);
        j = 0;
        while(cards[j].card)
        {
@@ -202,9 +205,9 @@ int main(void)
                        if (types[0])
                        {
                                types[strlen(types)-1] = '\0';
-                               fprintf(fp, "\t\t%s %s%s%s type=%s protocol=%s layermask=%s debug=0x%x\n", input[0]?"insmod -f":"modprobe", input, cards[j].module, input[0]?".ko":"", types, protocol, layermask, carddebug);
+                               fprintf(fp, "\t\t%s %s%s%s type=%s protocol=%s layermask=%s debug=0x%x\n", input[0]?"insmod -f":"modprobe --ignore-install", input, cards[j].module, input[0]?".ko":"", types, protocol, layermask, carddebug);
                        } else
-                               fprintf(fp, "\t\t%s %s%s%s protocol=%s layermask=%s debug=0x%x\n", input[0]?"insmod -f":"modprobe", input, cards[j].module, input[0]?".ko":"", protocol, layermask, carddebug);
+                               fprintf(fp, "\t\t%s %s%s%s protocol=%s layermask=%s debug=0x%x\n", input[0]?"insmod -f":"modprobe --ignore-install", input, cards[j].module, input[0]?".ko":"", protocol, layermask, carddebug);
                }
                j++;
        }