]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2002/12/05 11:08:35
authormouring <mouring>
Mon, 23 Dec 2002 02:22:09 +0000 (02:22 +0000)
committermouring <mouring>
Mon, 23 Dec 2002 02:22:09 +0000 (02:22 +0000)
     [scp.c]
     use roundup() similar to rcp/util.c and avoid problems with strange
     filesystem block sizes, noted by tjr@freebsd.org; ok djm@

ChangeLog
scp.c

index 58d89eaaddd696da8f539859cfc71f91b9caa67b..682ec2003c837ad67b0f71fa3831eb0d04d73373 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      [session.c]
      remove xauth entries before add; PR 2994 from janjaap@stack.nl.
      ok markus@
+   - markus@cvs.openbsd.org 2002/12/05 11:08:35
+     [scp.c]
+     use roundup() similar to rcp/util.c and avoid problems with strange
+     filesystem block sizes, noted by tjr@freebsd.org; ok djm@
 
 20021205
  - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
diff --git a/scp.c b/scp.c
index 4214e0c53dc61c28a44ed855da1ce19eb2c1dff0..eb5f23e4058404010707246bdf8217c3e5e24726 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.94 2002/11/27 17:53:35 markus Exp $");
+RCSID("$OpenBSD: scp.c,v 1.95 2002/12/05 11:08:35 markus Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
@@ -1058,11 +1058,9 @@ allocbuf(bp, fd, blksize)
                run_err("fstat: %s", strerror(errno));
                return (0);
        }
-       if (stb.st_blksize == 0)
+       size = roundup(stb.st_blksize, blksize);
+       if (size == 0)
                size = blksize;
-       else
-               size = blksize + (stb.st_blksize - blksize % stb.st_blksize) %
-                   stb.st_blksize;
 #else /* HAVE_STRUCT_STAT_ST_BLKSIZE */
        size = blksize;
 #endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */
This page took 0.095852 seconds and 5 git commands to generate.