tar: drop RTU support

Masscomp, which became Concurrent, dropped support for RTU
in the early 2000s, and there is no longer a need for tar
to worry about it.
* src/create.c (file_dumpable_p, dump_regular_file, dump_file0):
Do not worry about S_ISCTG; assume it always returns 0.
This commit is contained in:
Paul Eggert
2026-09-30 21:19:49 -07:00
parent 80ed937a08
commit c17976eba5
3 changed files with 10 additions and 11 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
GNU tar NEWS - User visible changes. 2026-08-21
GNU tar NEWS - User visible changes. 2026-09-30
Please send GNU tar bug reports to <bug-tar@gnu.org>
version 1.35.90 (git)
@@ -44,6 +44,9 @@ option.
Formerly, the behavior was undocumented and differed from one tar
version to the next.
** Support for RTU-style contiguous files has been withdrawn.
RTU’s supplier dropped support for RTU decades ago.
* Bug fixes
** When extracting, tar no longer follows symbolic links to targets
+4 -4
View File
@@ -242,10 +242,10 @@ FIFO file archives the existence of this file and not its contents.
@item @code{CONTTYPE}
This specifies a contiguous file, which is the same as a normal
file except that, in operating systems which support it, all its
space is allocated contiguously on the disk. Operating systems
which do not allow contiguous allocation should silently treat this
type as a normal file.
file except that in the old RTU operating system that implemented it,
all the file space was allocated contiguously on disk.
Today's operating systems do not consider contiguous files to be a
separate type, and @command{tar} extracts these files like regular files.
@item @code{A} @dots{} @code{Z}
These are reserved for custom implementations. Some of these are
+2 -6
View File
@@ -454,7 +454,7 @@ file_dumpable_p (struct stat const *st)
{
if (S_ISDIR (st->st_mode))
return true;
if (! (S_ISREG (st->st_mode) || S_ISCTG (st->st_mode)))
if (!S_ISREG (st->st_mode))
return false;
if (dev_null_output)
return totals_option && sparse_option && ST_IS_SPARSE (*st);
@@ -1028,10 +1028,6 @@ dump_regular_file (int fd, struct tar_stat_info *st)
if (!blk)
return dump_status_fail;
/* Mark contiguous files, if we support them. */
if (archive_format != V7_FORMAT && S_ISCTG (st->stat.st_mode))
blk->header.typeflag = CONTTYPE;
finish_header (st, blk, block_ordinal);
mv_begin_write (st->file_name, st->stat.st_size, st->stat.st_size);
@@ -1712,7 +1708,7 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
if (!is_dir && dump_hard_link (st))
return allocated;
if (is_dir || S_ISREG (st->stat.st_mode) || S_ISCTG (st->stat.st_mode))
if (is_dir || S_ISREG (st->stat.st_mode))
{
bool ok;
struct stat st2;