Use full-read instead of safe-read

This helps handle archiving on certain filesystems where read()
returns less bytes than requested when reading from a regular
file.

References:

  https://savannah.gnu.org/bugs/index.php?64426
  https://lists.gnu.org/archive/html/bug-tar/2021-07/msg00001.html

* gnulib.modules: Add full-read.
* src/common.h: Include full-read.h
* src/misc.c: Use full_read.
* src/sparse.c: Likewise.
* src/update.c: Likewise.
This commit is contained in:
Sergey Poznyakoff
2023-07-15 18:06:27 +03:00
parent 31f68bbe2a
commit e7a5e12445
5 changed files with 60 additions and 29 deletions

View File

@@ -58,6 +58,7 @@
#include <modechange.h>
#include <quote.h>
#include <safe-read.h>
#include <full-read.h>
#include <stat-time.h>
#include <timespec.h>
#define obstack_chunk_alloc xmalloc