Commit Graph

416 Commits

Author SHA1 Message Date
Paul Eggert
e1ac06bcca (read_header): Accept file names as specified by POSIX.1-1996 section 10.1.1. 1998-12-07 22:36:22 +00:00
Paul Eggert
53a5ac41d2 (set_stat): chmod after chown even when not root; if we are using
--same-owner this is needed e.g. on Solaris 2.5.1.
1998-11-30 22:17:11 +00:00
Paul Eggert
b9ca9399a1 Don't use rexec code unless compiled with WITH_REXEC. On many
installations, rexec is disabled.
1998-10-29 02:22:34 +00:00
Paul Eggert
b21cfb5780 Ghostscript 6.0 1998-09-09 23:52:32 +00:00
Paul Eggert
887188311d (uid_to_uname, gid_to_gname): Don't used cached name for nameless
users and groups.
1998-08-07 19:09:15 +00:00
junio
4559fdbfb1 Implement -E (ending-file) option. 1997-12-04 07:07:11 +00:00
junio
d1f1e3a189 Implement -E (ending-file) option. 1997-12-04 06:37:52 +00:00
Paul Eggert
56569a0f75 (main): Don't assume mt_count is of type daddr_t. 1997-11-10 19:13:12 +00:00
Paul Eggert
48be206fbf (to_oct): Now static. Value arg is now uintmax_t. Accept new args
giving name of type of octal field, for error messages.  Report an
error if the value is too large to fit in the field.
(gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.

(write_eot, write_long, finish_header, deal_with_sparse,
finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
appropriate.  Remove now-useless casts.  Use unsigned long to print
*_t types, except use STRINGIFY_BIGINT for off_t.

(find_new_file_size): 1st arg is now off_t*.
(finish_sparse_file): Args now use off_t, not long.
Check for lseek error.
(create_archive, dump_file): Cast -1 to dev_t when necessary.
(dump_file): Device arg is now dev_t.
Avoid overflow when testing whether file has holes
by using the new ST_NBLOCKSIZE macro.
1997-10-31 00:58:55 +00:00
Paul Eggert
293c604c5d (rmt_read__, rmt_write__): Now returns ssize_t.
(rmt_lseek): Now returns off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
ac8cfdacf6 (record_start_block, save_totsize, save_sizeleft, real_s_totsize,
real_s_sizeleft, current_block_ordinal): Now off_t.
(write_error): Arg is now ssize_t.
(child_pid): Now pid_t.
(available_space_after): Now size_t.

(child_open_for_compress, child_open_for_uncompress, flush_write,
open_archive, flush_write, write_error, flush_read, close_archive):
Use pid_t, ssize_t, size_t when appropriate.  Remove now-useless
casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
241bbee81b (read_and, list_archive, read_header, decode_mode, print_header,
print_for_mkdir): Use mode_t, off_t, size_t when appropriate.  Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.

(read_header): Check for overflow when converting header size.

(from_oct): Now static.  Now returns uintmax_t.  `where' arg is now
const char *.  Size arg is now size_t.  Now takes new type and maxval
args.  Compute result using uintmax_t, not long.  Report error if
field does not contain octal number in range.
(gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
uintmax_from_oct): New functions.

(stringify_uintmax_t_backwards): New function.

(decode_mode, print_for_mkdir): Mode arg is now mode_t.
(skip_file): Offset arg is now off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
49086e2770 (newdir_umask, current_umask): Now mode_t.
(extract_sparse_file): Args now use off_t.

(set_mode, set_stat, make_directories, extract_sparse_file,
extract_archive): Use off_t, size_t, ssize_t when appropriate.  Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
f3531f64fb (name_init): Fix typo in error message: FILE* was passed, but char*
was wanted.

(read_name_from_file, name_gather, addname, name_match, name_scan,
add_exclude): Use size_t when appropriate.  Remove now-useless casts.

(exclude_pool_size, allocated_exclude_pool_size): Now size_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
f2bad2db48 (extract_mangle): Check for overflow when converting off_t to size_t.
Use off_t, size_t when appropriate.  Remove now-useless casts.
1997-10-31 00:58:55 +00:00
Paul Eggert
dab18c15bd (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__): Use
pid_t, size_t, ssize_t when appropriate.  Remove now-useless casts.
Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
off_t.

(get_status_string, get_status_off): New function.
(get_status): Now returns long, so that it can store ssize_t.
Invoke get_status_string to do the real work.
(rmt_read__, rmt_write__): Now returns ssize_t.  Size arg is now size_t.
(rmt_lseek__): Now returns off_t, using new get_status_off function.
(rmt_ioctl__): Convert mt_count by hand, since it might be longer than long.
1997-10-31 00:58:55 +00:00
Paul Eggert
88ea940c0e (check_decimal): Now returns 1 if successful, 0 otherwise, and returns
uintmax_t value into new arg.  Check for arithmetic overflow.
(decode_options): Avoid overflow if record_size fits in size_t but not int.
Check for overflow on user or group ids.
1997-10-31 00:58:55 +00:00
Paul Eggert
ac65803ac9 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.
(update_archive): Cast -1 to dev_t when necessary.
1997-10-31 00:58:55 +00:00
Paul Eggert
998e6e081d (allocated_size): Now size_t, and now initialized to 0.
(prepare_record_buffer): Arg is now size_t.
Remove now-useless casts.

(main): Use `long' for status, so that it can store ssize_t.
Use daddr_t, mode_t, size_t, off_t when appropriate.
Convert daddr_t and off_t values ourselves, since they might be longer
than long.  Convert other types using `long' primitives.
When processing MTIOCTOP, do not try to pass resulting
count back, since it won't work (it could be too large) and it's
not expected anyway.
1997-10-31 00:58:55 +00:00
Paul Eggert
b7890ac757 GNU tar 1.12 1997-04-25 20:16:30 +00:00
Paul Eggert
5e0e89eac1 GNU tar 1.12 1997-04-25 20:09:49 +00:00
Paul Eggert
3e3d9b7e39 GNU tar 1.12 1997-04-25 17:10:08 +00:00
Paul Eggert
27e87f4f2f GNU tar 1.12 1997-04-25 13:48:46 +00:00
Paul Eggert
3728196fa6 GNU tar 1.12 1997-04-24 14:41:50 +00:00
Paul Eggert
70b61d565b GNU tar 1.12 1997-04-24 14:09:23 +00:00
Paul Eggert
76dce03c2e GNU tar 1.12 1997-04-24 02:25:57 +00:00
Paul Eggert
818c240503 GNU tar 1.12 1997-04-23 00:05:57 +00:00
Paul Eggert
be2c991f7b GNU tar 1.12 1997-04-22 06:31:03 +00:00
Paul Eggert
768c69b838 GNU tar 1.12 1997-04-22 05:35:50 +00:00
Paul Eggert
3bc4fa60f3 GNU tar 1.12 1997-04-20 02:43:34 +00:00
Paul Eggert
eed93f9a58 GNU tar 1.12 1997-04-19 22:44:12 +00:00
Paul Eggert
011a28be4d GNU tar 1.12 1997-04-18 16:36:06 +00:00
Paul Eggert
10797cd27b GNU tar 1.12 1997-04-18 02:44:58 +00:00
Paul Eggert
cee0eec6d2 GNU tar 1.12 1997-04-16 21:02:57 +00:00
Paul Eggert
a4f7f5bcc6 GNU tar 1.12 1997-04-15 20:34:49 +00:00
Paul Eggert
799e915cd3 GNU tar 1.12 1997-04-15 20:33:59 +00:00
Paul Eggert
63f2f45b88 tar 1.13 1997-04-15 20:32:54 +00:00
Paul Eggert
92b2f54fff GNU tar 1.12 1997-04-09 16:21:44 +00:00
Paul Eggert
3c08ec4317 GNU tar 1.12 1996-11-11 16:03:51 +00:00
François Pinard
0cc3967d3f *** empty log message *** 1994-11-16 03:05:01 +00:00
François Pinard
afe8811aa2 *** empty log message *** 1994-11-16 03:05:00 +00:00
François Pinard
38d3d03990 *** empty log message *** 1994-11-16 03:04:58 +00:00
François Pinard
62ece11468 Initial revision 1994-11-16 03:04:54 +00:00
François Pinard
2c4ed788dd *** empty log message *** 1994-11-16 03:03:54 +00:00
François Pinard
17badf101f *** empty log message *** 1994-11-16 03:03:50 +00:00
François Pinard
4c9bc16369 *** empty log message *** 1994-11-16 03:03:47 +00:00
François Pinard
09f5542664 *** empty log message *** 1994-11-16 03:03:44 +00:00
François Pinard
ea86c73665 *** empty log message *** 1994-11-16 03:03:41 +00:00
François Pinard
dd9d8052ae *** empty log message *** 1994-11-16 03:03:38 +00:00
François Pinard
98bca35e4a *** empty log message *** 1994-11-16 03:03:34 +00:00