diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-03-14 03:48:26 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-03-14 03:48:26 +0100 |
commit | 8fb212515dc6e0a8f0cc3b76f7946bb26b8c357d (patch) | |
tree | 44e7ffe709373d718a9935540760b49efde9a313 /sys/src/cmd/import.c | |
parent | 85a414751a1b9ba09dd7a72eee8746d81a7dcf53 (diff) |
import: make import -p work with explicit service in dialstring (thanks mischief)
mischief → ; import -p tcp!9.offblast.org!17007 / /n/9
mischief → -> import: can't mount /: EOF receiving fversion reply
mischief → on the console
mischief → bmo Mar 13 18:55:30 dialing tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 reconnected to tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 connected from 199.191.58.44
mischief → bmo Mar 13 18:55:34 exiting...bmo Mar 13 18:55:30 dialing tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 reconnected to tcp!9.offblast.org!17007
mischief → bmo Mar 13 18:55:30 connected from 199.191.58.44
mischief → bmo Mar 13 18:55:34 exiting...
mischief → aan is dialing the *exportfs* port because i explicitly specified it
Diffstat (limited to 'sys/src/cmd/import.c')
-rw-r--r-- | sys/src/cmd/import.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/import.c b/sys/src/cmd/import.c index 07ed96fe6..9ffe2e2d0 100644 --- a/sys/src/cmd/import.c +++ b/sys/src/cmd/import.c @@ -389,7 +389,8 @@ filter(int fd, char *cmd, char *host) if ((s = strrchr(buf, '!')) == nil) sysfatal("filter: illegally formatted port %s", buf); - snprint(addr, sizeof(addr), "%s", netmkaddr(host, "tcp", s+1)); + strecpy(addr, addr+sizeof(addr), netmkaddr(host, "tcp", s+1)); + strecpy(strrchr(addr, '!'), addr+sizeof(addr), s); if(debug) fprint(2, "filter: remote %s\n", addr); |