]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/setup/netstuff.c
Update libvirt to 2.1
[ipfire-2.x.git] / src / setup / netstuff.c
index f5b3849893e0784f63ba8cdf6752d50c45588766..000411c75c1ce98033ad761c0910f0359c76ad10 100644 (file)
@@ -601,16 +601,16 @@ int scan_network_cards(void)
 int nicmenu(int colour)
 {
        int rc, choise = 0, count = 0, kcount = 0, mcount = 0, i, j, nic_in_use;
-       int found_NIC_as_Card[4];
+       int found_NIC_as_Card[MAX_NICS];
        char message[STRING_SIZE];
        char temp[STRING_SIZE];
 
        char cMenuInhalt[STRING_SIZE];
-       char MenuInhalt[20][180];
-       char *pMenuInhalt[20];
+       char MenuInhalt[MAX_NICS][STRING_SIZE];
+       char *pMenuInhalt[MAX_NICS];
        
        while (strcmp(nics[count].macaddr, "")) count++;                        // 2 find how many nics in system
-       for ( i=0 ; i<4;i++) if (strcmp(knics[i].macaddr, "")) kcount++;        // loop to find all knowing nics
+       for (i=0; i<MAX_NICS; i++) if (strcmp(knics[i].macaddr, "")) kcount++;  // loop to find all knowing nics
 
        // If new nics are found...
        if (count > kcount) {
@@ -648,7 +648,7 @@ int nicmenu(int colour)
                sprintf(message, _("Please choose a networkcard for the following interface - %s."), ucolourcard[colour]);
                rc=2;
                while ( rc == 2 ) {
-                       rc = newtWinMenu(_("Extended Network Menu"), message, 50, 5, 5, 6, pMenuInhalt, &choise,
+                       rc = newtWinMenu(_("Extended Network Menu"), message, 50, 5, 5, mcount, pMenuInhalt, &choise,
                                _("Select"), _("Identify"), _("Cancel"), NULL);
                        if ( rc == 2 ) {
                                sprintf(temp, "/sbin/ip link set %s up", nics[found_NIC_as_Card[choise]].nic);