- 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@
This commit is contained in:
parent
611797ed15
commit
418e078378
|
@ -44,6 +44,10 @@
|
||||||
[session.c]
|
[session.c]
|
||||||
remove xauth entries before add; PR 2994 from janjaap@stack.nl.
|
remove xauth entries before add; PR 2994 from janjaap@stack.nl.
|
||||||
ok markus@
|
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
|
20021205
|
||||||
- (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
|
- (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
|
||||||
|
@ -879,4 +883,4 @@
|
||||||
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
||||||
ok provos@
|
ok provos@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2527 2002/12/23 02:15:57 mouring Exp $
|
$Id: ChangeLog,v 1.2528 2002/12/23 02:22:09 mouring Exp $
|
||||||
|
|
8
scp.c
8
scp.c
|
@ -75,7 +75,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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 "xmalloc.h"
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
|
@ -1058,11 +1058,9 @@ allocbuf(bp, fd, blksize)
|
||||||
run_err("fstat: %s", strerror(errno));
|
run_err("fstat: %s", strerror(errno));
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (stb.st_blksize == 0)
|
size = roundup(stb.st_blksize, blksize);
|
||||||
|
if (size == 0)
|
||||||
size = blksize;
|
size = blksize;
|
||||||
else
|
|
||||||
size = blksize + (stb.st_blksize - blksize % stb.st_blksize) %
|
|
||||||
stb.st_blksize;
|
|
||||||
#else /* HAVE_STRUCT_STAT_ST_BLKSIZE */
|
#else /* HAVE_STRUCT_STAT_ST_BLKSIZE */
|
||||||
size = blksize;
|
size = blksize;
|
||||||
#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */
|
#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */
|
||||||
|
|
Loading…
Reference in New Issue