Paul Eggert
9d308df132
maint: handle file sizes more reliably
...
Problem reported by Samuel Thibault in <http://bugs.gnu.org/11424 >.
* NEWS: Document this.
* src/dd.c (skip): Handle skipping past EOF on shared or typed
memory objects the same way as with regular files.
(dd_copy): It's OK to truncate shared memory objects.
* src/du.c (duinfo_add): Check for overflow.
(print_only_size): Report overflow.
(process_file): Ignore negative file sizes in the --apparent-size case.
* src/od.c (skip): Fix comment about st_size.
* src/split.c (main):
* src/truncate.c (do_ftruncate, main):
On files where st_size is not portable, fall back on using lseek
with SEEK_END to determine the size. Although strictly speaking
POSIX says the behavior is implementation-defined, in practice
if lseek returns a nonnegative value it's a reasonable one to
use for the file size.
* src/system.h (usable_st_size): Symlinks have reliable st_size too.
* tests/misc/truncate-dir-fail: Don't assume that getting the size
of a dir is not allowed, as it's now allowed on many platforms,
e.g., GNU/Linux.
2012-05-10 11:02:42 +02:00
..
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-03-07 12:59:00 +00:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-05-08 02:18:39 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:22:24 +02:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-03-10 19:53:06 +00:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:22:24 +02:00
2012-03-20 17:34:28 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-02-26 09:48:48 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-27 19:54:03 +02:00
2012-01-07 17:18:14 +01:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:22:24 +02:00
2012-04-04 12:22:24 +02:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:22:24 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-03-14 09:23:40 -06:00
2012-03-15 12:24:05 -06:00
2012-04-04 12:20:56 +02:00
2012-04-04 12:20:56 +02:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-04-04 12:20:56 +02:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-05 15:13:34 +00:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-04-04 14:30:18 +02:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-03-26 20:56:44 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-25 23:16:17 +00:00
2012-04-19 19:31:48 +02:00
2012-04-04 12:20:56 +02:00
2012-04-19 19:31:48 +02:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-09 21:50:08 +01:00
2012-04-04 12:20:56 +02:00
2012-01-01 10:04:06 +01:00
2012-01-05 15:12:16 +00:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-05-10 11:02:42 +02:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-05-08 02:18:39 +01:00
2012-01-01 10:04:06 +01:00
2012-01-27 11:35:24 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00
2012-01-01 10:04:06 +01:00
2012-01-01 10:04:06 +01:00
2012-01-09 21:50:08 +01:00