- Integrated patchs from Juergen Keil <jk@tools.de>
- Fix SIGIO error in scp - Simplify status line printing in scp
This commit is contained in:
parent
3b9d5e993a
commit
864ea59da6
|
@ -2,6 +2,8 @@
|
||||||
- Integrated patchs from Juergen Keil <jk@tools.de>
|
- Integrated patchs from Juergen Keil <jk@tools.de>
|
||||||
- Avoid void* pointer arithmatic
|
- Avoid void* pointer arithmatic
|
||||||
- Use LDFLAGS correctly
|
- Use LDFLAGS correctly
|
||||||
|
- Fix SIGIO error in scp
|
||||||
|
- Simplify status line printing in scp
|
||||||
- Added better test for inline functions compiler support from
|
- Added better test for inline functions compiler support from
|
||||||
Darren_Hall@progressive.com
|
Darren_Hall@progressive.com
|
||||||
|
|
||||||
|
|
16
scp.c
16
scp.c
|
@ -45,7 +45,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: scp.c,v 1.12 1999/12/07 04:38:32 damien Exp $");
|
RCSID("$Id: scp.c,v 1.13 1999/12/15 00:04:25 damien Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
@ -548,7 +548,7 @@ next: (void) close(fd);
|
||||||
if (haderr)
|
if (haderr)
|
||||||
(void) write(remout, bp->buf, amt);
|
(void) write(remout, bp->buf, amt);
|
||||||
else {
|
else {
|
||||||
result = write(remout, bp->buf, amt);
|
result = atomicio(write, remout, bp->buf, amt);
|
||||||
if (result != amt)
|
if (result != amt)
|
||||||
haderr = result >= 0 ? EIO : errno;
|
haderr = result >= 0 ? EIO : errno;
|
||||||
statbytes += result;
|
statbytes += result;
|
||||||
|
@ -974,7 +974,7 @@ run_err(const char *fmt,...)
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: scp.c,v 1.12 1999/12/07 04:38:32 damien Exp $
|
* $Id: scp.c,v 1.13 1999/12/15 00:04:25 damien Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
@ -1145,8 +1145,8 @@ progressmeter(int flag)
|
||||||
i++;
|
i++;
|
||||||
abbrevsize >>= 10;
|
abbrevsize >>= 10;
|
||||||
}
|
}
|
||||||
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %5qd %c%c ",
|
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %5d %c%c ",
|
||||||
(quad_t) abbrevsize, prefixes[i], prefixes[i] == ' ' ? ' ' :
|
(int) abbrevsize, prefixes[i], prefixes[i] == ' ' ? ' ' :
|
||||||
'B');
|
'B');
|
||||||
|
|
||||||
timersub(&now, &lastupdate, &wait);
|
timersub(&now, &lastupdate, &wait);
|
||||||
|
@ -1184,7 +1184,11 @@ progressmeter(int flag)
|
||||||
atomicio(write, fileno(stdout), buf, strlen(buf));
|
atomicio(write, fileno(stdout), buf, strlen(buf));
|
||||||
|
|
||||||
if (flag == -1) {
|
if (flag == -1) {
|
||||||
signal(SIGALRM, (void *) updateprogressmeter);
|
struct sigaction sa;
|
||||||
|
sa.sa_handler = updateprogressmeter;
|
||||||
|
sigemptyset(&sa.sa_mask);
|
||||||
|
sa.sa_flags = SA_RESTART;
|
||||||
|
sigaction(SIGALRM, &sa, NULL);
|
||||||
alarmtimer(1);
|
alarmtimer(1);
|
||||||
} else if (flag == 1) {
|
} else if (flag == 1) {
|
||||||
alarmtimer(0);
|
alarmtimer(0);
|
||||||
|
|
Loading…
Reference in New Issue