diff options
author | Alex Wilson <alex.wilson@joyent.com> | 2015-08-11 00:23:16 +0000 |
---|---|---|
committer | Alex Wilson <alex.wilson@joyent.com> | 2015-09-03 14:05:34 -0700 |
commit | d0c1b872bd54d7989a1f97af5d5d86ec4a13cabe (patch) | |
tree | 76af59311a3eb0011f3012489d059212ea21cd21 /usr/src/cmd/ssh/libssh/common/proxy-io.c | |
parent | 42d2cb6faf809f84bbfd0fd73fe6f644b8417053 (diff) | |
download | illumos-joyent-d0c1b872bd54d7989a1f97af5d5d86ec4a13cabe.tar.gz |
OS-4689 Remove SunSSH from illumos-joyent
OS-4688 Switch platform over to using recent OpenSSH
Reviewed by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/cmd/ssh/libssh/common/proxy-io.c')
-rw-r--r-- | usr/src/cmd/ssh/libssh/common/proxy-io.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/usr/src/cmd/ssh/libssh/common/proxy-io.c b/usr/src/cmd/ssh/libssh/common/proxy-io.c deleted file mode 100644 index c025f28f0a..0000000000 --- a/usr/src/cmd/ssh/libssh/common/proxy-io.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> -#include <unistd.h> -#include "proxy-io.h" - -int -proxy_read_write_loop(int readfd, int writefd) -{ - int rbytes, bytes_to_write, bytes_written; - char readbuf[BUFFER_SIZ]; - char *ptr; - - rbytes = read(readfd, readbuf, sizeof (readbuf)); - - if (rbytes > 0) { - bytes_to_write = rbytes; - ptr = readbuf; - while (bytes_to_write > 0) { - if ((bytes_written = - write(writefd, ptr, bytes_to_write)) < 0) { - perror("write"); - return (0); - } - bytes_to_write -= bytes_written; - ptr += bytes_written; - } - } else if (rbytes <= 0) { - return (0); - } - /* Read and write successful */ - return (1); -} |