mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +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)
|
if(cp)
|
||||||
return linear;
|
return linear;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* if the network is unix, no service
|
||||||
|
*/
|
||||||
|
if(strncmp(linear, "unix!", 5) == 0)
|
||||||
|
return linear;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* add default service
|
* add default service
|
||||||
*/
|
*/
|
||||||
if(defsrv == 0)
|
if(defsrv == 0)
|
||||||
return linear;
|
return linear;
|
||||||
snprint(addr, sizeof(addr), "%s!%s", linear, defsrv);
|
|
||||||
|
|
||||||
|
snprint(addr, sizeof(addr), "%s!%s", linear, defsrv);
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue