mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
lib9: make netmkaddr handle unix! addresses better
This commit is contained in:
parent
226cc90ba7
commit
e082105c33
1 changed files with 7 additions and 1 deletions
|
@ -45,12 +45,18 @@ netmkaddr(char *linear, char *defnet, char *defsrv)
|
|||
if(cp)
|
||||
return linear;
|
||||
|
||||
/*
|
||||
* if the network is unix, no service
|
||||
*/
|
||||
if(strncmp(linear, "unix!", 5) == 0)
|
||||
return linear;
|
||||
|
||||
/*
|
||||
* add default service
|
||||
*/
|
||||
if(defsrv == 0)
|
||||
return linear;
|
||||
snprint(addr, sizeof(addr), "%s!%s", linear, defsrv);
|
||||
|
||||
snprint(addr, sizeof(addr), "%s!%s", linear, defsrv);
|
||||
return addr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue