summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-03-14 03:54:08 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-03-14 03:54:08 +0100
commitff677a1cb491b8a3b028057b71f662472107b418 (patch)
treeac8f27b2bb6304f8135b01d53278f856c353d97b /sys/src
parent8fb212515dc6e0a8f0cc3b76f7946bb26b8c357d (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.c3
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);