conserver.cf: devicesubst add 'b' for baud rate

Add a 'b' subst format to get baud rate numbers as well to build
up device names and the others.
This commit is contained in:
Bjoern A. Zeeb 2021-07-16 15:24:44 +00:00
parent 8b3dfdb14f
commit 42e0b46e78
2 changed files with 8 additions and 0 deletions

View File

@ -540,6 +540,10 @@ value
.PP
Numeric Replacement
.TP
.B b
.B baud
value
.TP
.B p
config
.B port

View File

@ -997,6 +997,9 @@ SubstValue(char c, char **s, int *i)
} else if (c == 'P') {
(*i) = pCE->netport;
retval = 1;
} else if (c == 'b') {
(*i) = pCE->baud->irate;
retval = 1;
}
}
@ -1009,6 +1012,7 @@ SubstToken(char c)
switch (c) {
case 'p':
case 'P':
case 'b':
substTokenCount[(unsigned)c]++;
return ISNUMBER;
case 'h':