summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2003-03-21 00:54:03 +0000
committerBen Lindstrom <mouring@eviladmin.org>2003-03-21 00:54:03 +0000
commitf56198fb86eb67c7b010eca32d2db79ac26b02d4 (patch)
tree69473f561bca9e79fe8532013f5d7942261edcca
parent1182f654ee0ab474c40f28e6f10fa543194a973e (diff)
- (bal) scp.c 'limit' conflicts with Cray. Rename to 'limitbw'
-rw-r--r--ChangeLog3
-rw-r--r--scp.c10
2 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index aa8836e9e..f53127240 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
7 [version.h] 7 [version.h]
8 enter 3.6 8 enter 3.6
9 - (bal) The days of lack of int64_t support are over. Sorry kids. 9 - (bal) The days of lack of int64_t support are over. Sorry kids.
10 - (bal) scp.c 'limit' conflicts with Cray. Rename to 'limitbw'
10 11
1120030318 1220030318
12 - (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] 13 - (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
@@ -1232,4 +1233,4 @@
1232 save auth method before monitor_reset_key_state(); bugzilla bug #284; 1233 save auth method before monitor_reset_key_state(); bugzilla bug #284;
1233 ok provos@ 1234 ok provos@
1234 1235
1235$Id: ChangeLog,v 1.2633.2.1 2003/03/21 00:51:35 mouring Exp $ 1236$Id: ChangeLog,v 1.2633.2.2 2003/03/21 00:54:03 mouring Exp $
diff --git a/scp.c b/scp.c
index ab67c0bb8..35d4c5f71 100644
--- a/scp.c
+++ b/scp.c
@@ -96,7 +96,7 @@ void bwlimit(int);
96arglist args; 96arglist args;
97 97
98/* Bandwidth limit */ 98/* Bandwidth limit */
99off_t limit = 0; 99off_t limitbw = 0;
100 100
101/* Name of current file being transferred. */ 101/* Name of current file being transferred. */
102char *curfile; 102char *curfile;
@@ -251,7 +251,7 @@ main(argc, argv)
251 speed = strtod(optarg, &endp); 251 speed = strtod(optarg, &endp);
252 if (speed <= 0 || *endp != '\0') 252 if (speed <= 0 || *endp != '\0')
253 usage(); 253 usage();
254 limit = speed * 1024; 254 limitbw = speed * 1024;
255 break; 255 break;
256 case 'p': 256 case 'p':
257 pflag = 1; 257 pflag = 1;
@@ -594,7 +594,7 @@ next: (void) close(fd);
594 haderr = result >= 0 ? EIO : errno; 594 haderr = result >= 0 ? EIO : errno;
595 statbytes += result; 595 statbytes += result;
596 } 596 }
597 if (limit) 597 if (limitbw)
598 bwlimit(amt); 598 bwlimit(amt);
599 } 599 }
600 if (showprogress) 600 if (showprogress)
@@ -688,7 +688,7 @@ bwlimit(int amount)
688 return; 688 return;
689 689
690 lamt *= 8; 690 lamt *= 8;
691 wait = (double)1000000L * lamt / limit; 691 wait = (double)1000000L * lamt / limitbw;
692 692
693 bwstart.tv_sec = wait / 1000000L; 693 bwstart.tv_sec = wait / 1000000L;
694 bwstart.tv_usec = wait % 1000000L; 694 bwstart.tv_usec = wait % 1000000L;
@@ -917,7 +917,7 @@ bad: run_err("%s: %s", np, strerror(errno));
917 statbytes += j; 917 statbytes += j;
918 } while (amt > 0); 918 } while (amt > 0);
919 919
920 if (limit) 920 if (limitbw)
921 bwlimit(4096); 921 bwlimit(4096);
922 922
923 if (count == bp->cnt) { 923 if (count == bp->cnt) {