Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | Upstream-Status: Pending |
| 2 | |
| 3 | Subject: rcp: fix to work with large files |
| 4 | |
| 5 | When we copy file by rcp command, if the file > 2GB, it will fail. |
| 6 | The cause is that it used incorrect data type on file size in sink() of rcp. |
| 7 | |
| 8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 9 | --- |
| 10 | src/rcp.c | 4 ++-- |
| 11 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 12 | |
| 13 | diff --git a/src/rcp.c b/src/rcp.c |
| 14 | index 21f55b6..bafa35f 100644 |
| 15 | --- a/src/rcp.c |
| 16 | +++ b/src/rcp.c |
| 17 | @@ -876,9 +876,9 @@ sink (int argc, char *argv[]) |
| 18 | enum |
| 19 | { YES, NO, DISPLAYED } wrerr; |
| 20 | BUF *bp; |
| 21 | - off_t i, j; |
| 22 | + off_t i, j, size; |
| 23 | int amt, count, exists, first, mask, mode, ofd, omode; |
| 24 | - int setimes, size, targisdir, wrerrno; |
| 25 | + int setimes, targisdir, wrerrno; |
| 26 | char ch, *cp, *np, *targ, *vect[1], buf[BUFSIZ]; |
| 27 | const char *why; |
| 28 | |
| 29 | -- |
| 30 | 1.9.1 |
| 31 | |