Lines Matching +full:pin +full:- +full:count
45 char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
65 { NULL, 'P', arg_string, &port, "non-default port", "port" },
107 argc -= optind; in main()
132 remin = remout = -1; in main()
135 "rcp%s%s%s", iamrecursive ? " -r" : "", in main()
136 pflag ? " -p" : "", targetshouldbedirectory ? " -d" : ""); in main()
140 if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */ in main()
145 verifydir(argv[argc - 1]); in main()
160 if ((thost = strchr(argv[argc - 1], '@')) != NULL) { in toremote()
163 tuser = argv[argc - 1]; in toremote()
169 thost = argv[argc - 1]; in toremote()
174 for (i = 0; i < argc - 1; i++) { in toremote()
187 suser = pwd->pw_name; in toremote()
191 "%s%s %s -l %s -n %s %s '%s%s%s:%s'", in toremote()
192 _PATH_RSH, eflag ? " -e" : "", in toremote()
199 "exec %s%s %s -n %s %s '%s%s%s:%s'", in toremote()
200 _PATH_RSH, eflag ? " -e" : "", in toremote()
205 if (ret == -1) in toremote()
210 if (remin == -1) { in toremote()
211 if (asprintf(&bp, "%s -t %s", cmd, targ) == -1) in toremote()
233 for (i = 0; i < argc - 1; i++) { in tolocal()
238 iamrecursive ? " -PR" : "", pflag ? " -p" : "", in tolocal()
239 argv[i], argv[argc - 1]); in tolocal()
240 if (ret == -1) in tolocal()
252 suser = pwd->pw_name; in tolocal()
257 suser = pwd->pw_name; in tolocal()
261 ret = asprintf(&bp, "%s -f %s", cmd, src); in tolocal()
262 if (ret == -1) in tolocal()
270 sink(1, argv + argc - 1); in tolocal()
272 remin = remout = -1; in tolocal()
333 for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { in source()
334 amt = bp->cnt; in source()
336 amt = stb.st_size - i; in source()
338 result = read(fd, bp->buf, (size_t)amt); in source()
343 write(remout, bp->buf, amt); in source()
345 result = write(remout, bp->buf, (size_t)amt); in source()
378 (long)statp->st_mtime, in rsource()
379 (long)statp->st_atime); in rsource()
388 (unsigned int)(statp->st_mode & MODEMASK), 0, last); in rsource()
395 if (dp->d_ino == 0) in rsource()
397 if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) in rsource()
399 if (strlen(name) + 1 + strlen(dp->d_name) >= MAXPATHLEN - 1) { in rsource()
400 run_err("%s/%s: name too long", name, dp->d_name); in rsource()
403 snprintf(path, sizeof(path), "%s/%s", name, dp->d_name); in rsource()
421 int amt, count, exists, first, mask, mode, ofd, omode; in sink() local
453 } while (cp < &buf[BUFSIZ - 1] && ch != '\n'); in sink()
471 *--cp = 0; in sink()
510 mode = (mode << 3) | (*cp - '0'); in sink()
516 size = size * 10 + (*cp++ - '0'); in sink()
545 /* Handle copying from a read-only directory */ in sink()
573 cp = bp->buf; in sink()
575 for (count = i = 0; i < size; i += BUFSIZ) { in sink()
578 amt = size - i; in sink()
579 count += amt; in sink()
585 amt -= j; in sink()
587 if (count == bp->cnt) { in sink()
590 j = write(ofd, bp->buf, (size_t)count); in sink()
591 if (j != count) { in sink()
596 count = 0; in sink()
597 cp = bp->buf; in sink()
600 if (count != 0 && wrerr == NO && in sink()
601 (j = write(ofd, bp->buf, (size_t)count)) != count) { in sink()
670 write(STDERR_FILENO, rbuf, cp - rbuf); in response()
673 return (-1); in response()
716 int pin[2], pout[2], reserved[2]; in do_cmd() local
725 if (pipe(pin) < 0) { in do_cmd()
744 close(pin[1]); in do_cmd()
746 dup2(pin[0], 0); in do_cmd()
748 close(pin[0]); in do_cmd()
754 args[i++] = "-4"; in do_cmd()
756 args[i++] = "-5"; in do_cmd()
758 args[i++] = "-K"; in do_cmd()
760 args[i++] = "-x"; in do_cmd()
762 args[i++] = "-F"; in do_cmd()
764 args[i++] = "-z"; in do_cmd()
766 args[i++] = "-p"; in do_cmd()
770 args[i++] = "-e"; in do_cmd()
772 args[i++] = "-l"; in do_cmd()
784 close(pin[0]); in do_cmd()
785 *fdout = pin[1]; in do_cmd()