Wayne Davison
705de51a73
Improved do_lseek()'s failure message.
2005-02-27 21:12:13 +00:00
Wayne Davison
54281fe733
- Changed the map_size parameter to map_file() to be an int32 named
...
"read_size".
- Changed some int vars in map_ptr() needed to be int32 vars.
- All callers expect map_ptr() to return back the full "len" bytes,
so we never shorten this value, even near EOF--the read will
just get zero-padded, as needed.
- Die with an error if someone calls map_ptr() with a len < 0, or
if read_size is computed as a value < 0.
2005-01-17 22:51:17 +00:00
Wayne Davison
7aac6604c4
- Use an int32 for the each block-size variable.
...
- Renamed the local block_size arg to blk_size (to avoid
confusion with the global block_size variable).
2005-01-01 21:08:07 +00:00
Wayne Davison
6e8a1782ab
- Changed the calling syntax for map_file() so that it takes both
...
a (possibly approximate) window size and an optional block size
(which is used to round-up the window size if it is non-zero).
- Don't set window_start behind the supplied offset in map_ptr().
2004-08-03 08:05:29 +00:00
Wayne Davison
7f290d5c82
- Added a new block_size arg to map_file(). Use it to set the
...
new def_window_size member variable.
- Got rid of max_map_size global (we use def_window_size now).
2004-07-20 21:35:52 +00:00
Wayne Davison
510b4cd4d5
Added a max_map_size variable, initialized to MAX_MAP_SIZE.
2004-07-16 18:02:30 +00:00
Wayne Davison
c7e11bfdc0
Make wf_writeBufSize based on a multiple of WRITE_SIZE instead
...
of the unrelated MAX_MAP_SIZE.
2004-07-16 01:32:02 +00:00
Wayne Davison
bf2b7ddfc5
Use memset() to initialize a new map_struct.
2004-05-11 19:46:56 +00:00
Wayne Davison
13aefa1365
Some whitespace tweaks.
2004-01-05 03:57:15 +00:00
Wayne Davison
9b9c8aaf4d
Improved flush_write_file().
2004-01-02 18:42:33 +00:00
Wayne Davison
76c2194714
Applying my updated version of Craig Barratt's buffered I/O patch.
2004-01-02 08:29:49 +00:00
Wayne Davison
58cadc8608
Merged in the security fixes from 2.5.7.
2003-12-06 21:07:27 +00:00
J.W. Schultz
6a7cc46cb2
Detect and report when open or opendir succeed but read and
...
readdir fail caused by network filesystems issues and
truncated files.
Thanks to David Norwood and Michael Brown
2003-09-16 02:49:59 +00:00
J.W. Schultz
9533e15a79
Changed write file to cope with partial writes by looping
...
until complete or errno is set.
(John Van Essen)
2003-05-22 23:24:44 +00:00
Martin Pool
a261989cda
More signedness fixes; should be harmless.
2002-01-25 23:07:33 +00:00
Martin Pool
9dd891bb28
Signedness security patch from Sebastian Krahmer <krahmer@suse.de> --
...
in some cases we were not sufficiently careful about reading integers
from the network.
Also, make sure log messages are always nul-terminated.
2002-01-23 04:57:18 +00:00
Andrew Tridgell
4440b8aa3f
no longer use mmap() in rsync because of the risk of a SIGBUS when
...
another program (such as a mailer) truncates a file.
To offset the speed loss I have rewritten the map_ptr() code to make
much better use of read().
1998-12-30 14:48:45 +00:00
Andrew Tridgell
654175798b
patch from Alberto Accomazzi <aaccomazzi@cfa.harvard.edu> to add
...
different exit codes for different conditions.
1998-11-03 07:08:27 +00:00
Andrew Tridgell
4c36ddbeec
heaps of cleanup in the io code.
...
we no longer use non-blocking IO, instead it uses select a lot more,
being careful to always allow for reading whenever a valid read fd is
available and chcking timeouts.
also split the file io calls into fileio.c
1998-05-27 12:37:22 +00:00