search for: haderr

Displaying 12 results from an estimated 12 matches for "haderr".

2006 May 14
1
scp patch to delete source files after copy
...uot;, iamrecursive ? " -r" : "", pflag ? " -p" : "", + delete_source ? " -u" : "", targetshouldbedirectory ? " -d" : ""); (void) signal(SIGPIPE, lostconn); *************** *** 651,659 **** haderr = errno; fd = -1; } ! if (!haderr) (void) atomicio(vwrite, remout, "", 1); ! else run_err("%s: %s", name, strerror(haderr)); (void) response(); } --- 658,672 ---- haderr = errno; fd = -1; } ! if (!haderr) { ! if (delete_source) {...
2000 Aug 18
0
[PATCH] Support symlinks in scp of openssh 2
...4o %lu %s\n", + ((stb.st_mode & S_IFMT) == S_IFLNK) ? 'L' : 'C', + (unsigned int) (stb.st_mode & FILEMODEMASK), (unsigned long) stb.st_size, last); @@ -609,5 +630,8 @@ next: (void) close(fd); amt = stb.st_size - i; if (!haderr) { - result = atomicio(read, fd, bp, amt); + if ((stb.st_mode & S_IFMT) == S_IFLNK) + result = readlink(name, bp, amt); + else + result = atomicio(read, fd, bp, amt); if (result != amt) haderr = result >= 0 ? EIO : errno; @@ -625,5 +649,5 @@ next: (void) close(f...
1999 Dec 14
2
1.2pre17 scp Input/Output error
Under OpenSSH 1.2pre17 I can duplicate and Input/Output error for scp: Conditions: pc36 is a RH6.0/i386 box. abc.co.za is a RH5.2/i386 box. (private network) openssh 1.2 pre 17 on both boxes. Line between them is a 128k leased line. It works between two 10baseT machines. If the scrollbar is active, the scp fails, if it isn't active, scp works. Note that without the scrollbar, the file gets
2002 Jul 13
0
[PATCH]: scp program improved
...*(strstr(cmd, " -R")) = '\0'; (void) signal(SIGPIPE, lostconn); @@ -482,14 +523,18 @@ char *argv[]; { struct stat stb; + struct timeval wait, lastupdate, now; static BUF buffer; BUF *bp; - off_t i, amt, result; + off_t i, amt, result, bcounter; int fd, haderr, indx; - char *last, *name, buf[2048]; + char *last, *name, buf[2048], c; int len; + /* For rate limit */ + int buf_size, cur_mod; + long int sleep_time; - for (indx = 0; indx < argc; ++indx) { + for (indx = 0; indx < argc; ++indx) { name = argv[indx]; sta...
2001 Apr 13
0
LFS changes...
...atic struct timeval start; /* Number of bytes of current file transferred so far. */ -volatile u_long statbytes; +volatile off_t statbytes; /* Total size of current file. */ off_t totalbytes = 0; @@ -501,8 +502,8 @@ struct stat stb; static BUF buffer; BUF *bp; - off_t i; - int amt, fd, haderr, indx, result; + off_t i, amt, result; + int fd, haderr, indx; char *last, *name, buf[2048]; for (indx = 0; indx < argc; ++indx) {
2001 Apr 20
2
scp with files > 2gb
...pport largefiles. I've tried this under Solaris and scp fails with a broken pipe on only the second write to the pipe between scp and ssh if the file is over 2gb. If the file is under 2gb it works fine. it fails the second time around the for loop that looks like this in scp.c:source() for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { amt = bp->cnt; if (i + amt > stb.st_size) amt = stb.st_size - i; if (!haderr) { SIGPIPE =====>>> result = atomicio(read, fd, bp->buf, amt); .... } scp from: OpenSSH 2.5.1p2 client and server both Solaris. Any commen...
2002 Feb 06
2
SFTP Status Bar..
...- /* Number of bytes of current file transferred so far. */ volatile off_t statbytes; @@ -569,7 +549,7 @@ } if (showprogress) { totalbytes = stb.st_size; - progressmeter(-1); + updateprogressmeter(0); } /* Keep writing after an error so that we stay sync'd up. */ for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { @@ -591,7 +571,7 @@ } } if (showprogress) - progressmeter(1); + updateprogressmeter(1); if (close(fd) < 0 && !haderr) haderr = errno; @@ -835,7 +815,7 @@ if (showprogress) { totalbytes = size; - progressmet...
2002 Jan 30
1
Quick sftp status indicator.
...542,7 +530,9 @@ } if (showprogress) { totalbytes = stb.st_size; - progressmeter(-1); + progressmeter(-1, statbytes, totalbytes, curfile); + signal(SIGALRM, updateprogressmeter); + alarm(PROGRESSTIME); } /* Keep writing after an error so that we stay sync'd up. */ for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { @@ -564,7 +554,7 @@ } } if (showprogress) - progressmeter(1); + progressmeter(1, statbytes, totalbytes, curfile); if (close(fd) < 0 && !haderr) haderr = errno; @@ -808,7 +798,9 @@ if (showprogress) { totalbyt...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...- /* Number of bytes of current file transferred so far. */ volatile off_t statbytes; @@ -542,7 +530,7 @@ } if (showprogress) { totalbytes = stb.st_size; - progressmeter(-1); + updateprogressmeter(0); } /* Keep writing after an error so that we stay sync'd up. */ for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { @@ -564,7 +552,7 @@ } } if (showprogress) - progressmeter(1); + updateprogressmeter(1); if (close(fd) < 0 && !haderr) haderr = errno; @@ -808,7 +796,7 @@ if (showprogress) { totalbytes = size; - progressmet...
2006 Apr 16
0
[PATCH] warning: comparison between signed and unsigned in function source@scp.c
...scp.c,v retrieving revision 1.141 diff -u -r1.141 scp.c --- scp.c 1 Apr 2006 05:50:29 -0000 1.141 +++ scp.c 16 Apr 2006 04:31:34 -0000 @@ -548,8 +548,7 @@ struct stat stb; static BUF buffer; BUF *bp; - off_t i, amt, statbytes; - size_t result; + off_t i, amt, statbytes, result; int fd = -1, haderr, indx; char *last, *name, buf[2048]; int len;
2001 May 12
4
Erase the source file open; specify a tempfile name option
...+ cmdlen + 20; bp = xmalloc(len); (void) snprintf(bp, len, "%s -f %s", cmd, src); if (do_cmd(host, suser, bp, &remin, &remout, argc) < 0) { @@ -582,7 +602,10 @@ (void) atomicio(write, remout, "", 1); else run_err("%s: %s", name, strerror(haderr)); - (void) response(); + if (response() == 0 && eraseflag && !haderr) { + if (unlink(name) < 0) + run_err("%s: %s", name, strerror(errno)); + } } } @@ -656,7 +679,7 @@ int amt, count, exists, first, mask, mode, ofd, omode; off_t size; int setimes, tar...
2003 Oct 08
4
OS/390 openssh
.../* User-visible flags. */ case '1': @@ -275,6 +282,11 @@ case 'q': showprogress = 0; break; +#ifdef CHARSET_EBCDIC + case 'b': + binary = 1; + break; +#endif /* Server options. */ case 'd': @@ -579,6 +591,13 @@ if (result != amt) haderr = result >= 0 ? EIO : errno; } +#ifdef CHARSET_EBCDIC + if (binary) { + /* Convert to EBCDIC */ + /* ssh will convert back to ASCII */ + __atoe_l(bp->buf,amt); + } +#endif if (haderr) (void) atomicio(vwrite, remout, bp->buf, amt); else { @@ -908,7 +927,13 @@...