ip/ipconfig: ndbvalfmt() strings when formatting ndb entries.

This commit is contained in:
cinap_lenrek 2024-10-28 22:51:42 +00:00
parent d248f8e847
commit eb76dc48cd
3 changed files with 5 additions and 4 deletions

View file

@ -909,7 +909,7 @@ optgetx(uchar *p, uchar opt)
break;
case Tstr:
if(optgetstr(p, opt, str, sizeof str))
s = smprint("%s=%s", o->name, str);
s = smprint("%s=%$", o->name, str);
break;
case Tvec:
n = optgetvec(p, opt, vec, sizeof vec);

View file

@ -149,6 +149,9 @@ void warning(char *fmt, ...);
#define DEBUG if(debug)warning
#pragma varargck argpos warning 1
/* for ndbvalfmt */
#pragma varargck type "$" char*
/*
* DHCP
*/

View file

@ -52,8 +52,6 @@ static void ndbconfig(void);
static int Ufmt(Fmt*);
#pragma varargck type "U" char*
/* for ndbvalfmt */
#pragma varargck type "$" char*
void
usage(void)
@ -768,7 +766,7 @@ putndb(int doadd)
if(doadd){
if(ipnet != nil && validip(conf.raddr)){
p = seprint(p, e, "ipnet=%s ip=%I ipmask=%M ipgw=%I\n",
p = seprint(p, e, "ipnet=%$ ip=%I ipmask=%M ipgw=%I\n",
ipnet, conf.raddr, conf.mask, conf.gaddr);
}
if(validip(conf.laddr)){