diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-03-14 03:54:08 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-03-14 03:54:08 +0100 |
commit | ff677a1cb491b8a3b028057b71f662472107b418 (patch) | |
tree | ac8f27b2bb6304f8135b01d53278f856c353d97b /sys/src | |
parent | 8fb212515dc6e0a8f0cc3b76f7946bb26b8c357d (diff) |
cpu: make -p work with explicit service in dialstring (same as import)
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/cpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/cpu.c b/sys/src/cmd/cpu.c index 7606f45ad..53a4bb846 100644 --- a/sys/src/cmd/cpu.c +++ b/sys/src/cmd/cpu.c @@ -783,7 +783,8 @@ filter(int fd, char *host) buf[len] = '\0'; if((s = strrchr(buf, '!')) == nil) fatal("filter: malformed remote 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); } snprint(buf, sizeof(buf), "%s", filterp); |