Increased terminal ports
This commit is contained in:
parent
d15a905fa9
commit
139ec0d628
@ -49,6 +49,11 @@ v0.71.1 28-Nov-2004
|
||||
Changed X-JAM kludges to X-FTN kludges to make it compatible
|
||||
with the rest of the gates.
|
||||
|
||||
mbsetup:
|
||||
Added support for XxxxBSD console port.
|
||||
For new systems, there will now be 20 terminal ports created
|
||||
instead of 10.
|
||||
|
||||
examples:
|
||||
Removed bbs list items from the English menus and txtfiles and
|
||||
the Spanish menus and txtfiles.
|
||||
|
@ -51,7 +51,7 @@ int CountTtyinfo(void)
|
||||
{
|
||||
FILE *fil;
|
||||
char ffile[PATH_MAX];
|
||||
int count, i;
|
||||
int count = 0, i;
|
||||
|
||||
sprintf(ffile, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
|
||||
if ((fil = fopen(ffile, "r")) == NULL) {
|
||||
@ -61,7 +61,7 @@ int CountTtyinfo(void)
|
||||
ttyinfohdr.recsize = sizeof(ttyinfo);
|
||||
fwrite(&ttyinfohdr, sizeof(ttyinfohdr), 1, fil);
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
memset(&ttyinfo, 0, sizeof(ttyinfo));
|
||||
sprintf(ttyinfo.comment, "Network port %d", i+11);
|
||||
sprintf(ttyinfo.tty, "pts/%d", i);
|
||||
@ -71,9 +71,10 @@ int CountTtyinfo(void)
|
||||
ttyinfo.available = TRUE;
|
||||
sprintf(ttyinfo.name, "Network port #%d", i+11);
|
||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||
count++;
|
||||
}
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
memset(&ttyinfo, 0, sizeof(ttyinfo));
|
||||
sprintf(ttyinfo.comment, "Network port %d", i+1);
|
||||
sprintf(ttyinfo.tty, "ttyp%d", i);
|
||||
@ -83,8 +84,13 @@ int CountTtyinfo(void)
|
||||
ttyinfo.available = TRUE;
|
||||
sprintf(ttyinfo.name, "Network port #%d", i+1);
|
||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||
count++;
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
/*
|
||||
* Linux has 6 virtual consoles
|
||||
*/
|
||||
for (i = 0; i < 6; i++) {
|
||||
memset(&ttyinfo, 0, sizeof(ttyinfo));
|
||||
sprintf(ttyinfo.comment, "Console port %d", i+1);
|
||||
@ -93,7 +99,23 @@ int CountTtyinfo(void)
|
||||
ttyinfo.type = LOCAL;
|
||||
ttyinfo.available = TRUE;
|
||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||
count++;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
/*
|
||||
* By default, xxxBSD systems have only one console
|
||||
*/
|
||||
memset(&ttyinfo, 0, sizeof(ttyinfo));
|
||||
sprintf(ttyinfo.comment, "Console port 1");
|
||||
sprintf(ttyinfo.tty, "console");
|
||||
sprintf(ttyinfo.speed, "10 mbit");
|
||||
ttyinfo.type = LOCAL;
|
||||
ttyinfo.available = TRUE;
|
||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||
count++;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
memset(&ttyinfo, 0, sizeof(ttyinfo));
|
||||
@ -118,6 +140,7 @@ int CountTtyinfo(void)
|
||||
ttyinfo.honor_zmh = TRUE;
|
||||
sprintf(ttyinfo.name, "ISDN line #%d", i+1);
|
||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||
count++;
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
@ -148,11 +171,12 @@ int CountTtyinfo(void)
|
||||
#endif
|
||||
sprintf(ttyinfo.name, "Modem line #%d", i+1);
|
||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||
count++;
|
||||
}
|
||||
|
||||
fclose(fil);
|
||||
chmod(ffile, 0640);
|
||||
return 34;
|
||||
return count;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user