Commit Graph
18633 Commits
Author SHA1 Message Date
Jim Meyering 12357df452 (fts_stat, fts_alloc): Always allocate and use a struct
stat, even if the user isn't interested in the results.
This prevents a core dump in cycle_check when FTS_NOSTAT is set.
2004-06-08 13:31:43 +00:00
Jim Meyering 2eba29a312 (ENOTSUP): Remove. 2004-06-08 13:24:09 +00:00
Jim Meyering 05638ca424 fix typo 2004-06-08 13:23:42 +00:00
Jim Meyering b66ead2e0c *** empty log message *** 2004-06-08 13:23:17 +00:00
Jim Meyering eb4aaec1a5 (EOPNOTSUPP): Define if not defined.
(ENOSYS): Remove.
2004-06-08 12:02:00 +00:00
Jim Meyering 0746994e48 (lchown): Return EOPNOTSUPP if not supported; this
is what POSIX-2004 specifies.
2004-06-08 12:01:38 +00:00
Jim Meyering 54ac424e7d *** empty log message *** 2004-06-08 07:13:18 +00:00
Jim Meyering 24df65c287 (main): Fix typo introduced on 2003-05-10 that
prevented a diagnostic of any operands.
2004-06-08 07:13:10 +00:00
Jim Meyering 069bf2f43c *** empty log message *** 2004-06-08 06:56:08 +00:00
Jim Meyering 58a9bc79b5 . 2004-06-08 06:54:04 +00:00
Jim Meyering 62d6b980b2 (direct_mode): Turn it on/off with directio, too. 2004-06-08 06:47:43 +00:00
Jim Meyering 8cb9d48559 *** empty log message *** 2004-06-07 15:27:47 +00:00
Jim Meyering 16155336a0 Enable direct-mode I/O (bypassing the buffer cache), if possible.
Prompted by a suggestion from Kalle Olavi Niemitalo
in http://bugs.debian.org/207035.

(direct_mode): New function.
(do_wipefd): Turn on direct-mode I/O.
(dopass): If a file's first write fails with EINVAL,
turn off direct-mode I/O and retry the write.
2004-06-07 15:27:42 +00:00
Jim Meyering 8f3e7ea813 *** empty log message *** 2004-06-07 15:26:52 +00:00
Jim Meyering c410e41685 (gl_MACROS): Check for the directio function. 2004-06-07 15:26:49 +00:00
Jim Meyering 0ce5f6610f *** empty log message *** 2004-06-07 08:21:10 +00:00
Jim Meyering 34b2d4920f Remove menu references to just-removed subsection. 2004-06-07 08:21:07 +00:00
Jim Meyering d14676e7fc *** empty log message *** 2004-06-06 19:31:46 +00:00
Jim Meyering 032b5b3bcf (tr invocation): Remove the section describing
how POSIXLY_CORRECT changes tr's behavior.
2004-06-06 19:31:43 +00:00
Jim Meyering 9011b52917 fix typo in comment 2004-06-06 19:18:49 +00:00
Jim Meyering 62d61c7c12 *** empty log message *** 2004-06-06 19:03:05 +00:00
Jim Meyering 12c6cc38c2 Update from gnulib. 2004-06-06 19:03:01 +00:00
Jim Meyering 558c5aa7ff *** empty log message *** 2004-06-06 14:20:20 +00:00
Jim Meyering 8bf5b1841c (main): "tr -d a b" is now a fatal error even if POSIXLY_CORRECT is set.
The POSIX SYNOPSIS does not allow this option combination.
2004-06-06 14:20:16 +00:00
Jim Meyering 8600e5f5f7 *** empty log message *** 2004-06-04 17:44:24 +00:00
Jim Meyering 657842c693 (dopass): Don't subtract 1 from the offset after
a write error.  Problem reported by Jon Peatfield in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html
2004-06-04 17:43:55 +00:00
Jim Meyering b07edbf476 *** empty log message *** 2004-06-03 16:03:44 +00:00
Jim Meyering fa81dcf58e *** empty log message *** 2004-06-03 16:03:39 +00:00
Jim Meyering 6f31b14a6d Fix bug reported by Buciuman Adrian in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00105.html>
where 'dd' created a file that was too large.  The bug was that dd
assumed that the input file offset does not advance after a failed
read; but POSIX says that the input file offset is undefined after
a failed read.

(MAX_BLOCKSIZE): New macro.
(input_seekable, input_seek_errno, input_offset,
input_offset_overflow): New vars.
(scanargs): Reject block sizes greater than MAX_BLOCKSIZE.
(advance_input_offset): New function.
(skip_via_lseek): Set errno to zero when reporting our failure,
so that we don't report based on garbage errno.
(skip): If fdesc is standard input, advance the input offset.
Do not quit if reading, and if noerror was specified;
POSIX seems to require this.
If read fails on output file, report the earlier lseek failure
instead; this fixes a FIXME in dd_copy.
(advance_input_after_read_error): New function.
(dd_copy): Use it, instead of assuming that failed reads
do not advance the file pointer.  Advance input offset
after nonfailed reads.  Advance only a partial block if
the previous read (before the failed read) succeeded, and
do not generate an output block of zeros in this case.
(main): Determine initial input offset, seekability of input,
and error if it wasn't seekable.
2004-06-03 16:03:32 +00:00
Jim Meyering 6e81a1d947 *** empty log message *** 2004-06-02 21:41:42 +00:00
Jim Meyering f7d818938f *** empty log message *** 2004-06-02 21:39:49 +00:00
Jim Meyering a0b4523704 rm (without -f) could hang unnecessarily when attempting to
remove a symlink to a file on an off-line NFS-mounted partition.
Reported by David Howells in https://bugzilla.redhat.com/124699.

(write_protected_non_symlink): New function.
Don't invoke euidaccess on symlinks.
(prompt): Use write_protected_non_symlink rather than using
euidaccess directly, being careful not to call lstat twice for a file.
2004-06-02 21:39:45 +00:00
Jim Meyering 0539abe980 *** empty log message *** 2004-06-02 21:23:42 +00:00
Jim Meyering 2cd87c6562 (cut invocation): Clarify what --output-delimiter=STR
does with byte/character ranges.
2004-06-02 21:23:39 +00:00
Jim Meyering d53e7ba8a1 . 2004-06-02 21:21:05 +00:00
Jim Meyering 977dd1a0eb *** empty log message *** 2004-06-02 21:20:45 +00:00
Jim Meyering 847e066085 Fix a bug in how the --output-delimiter=D option works with
abutting byte or character ranges.  Reported by David Krider in
http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00132.html

(print_kth): Remove special case for open-ended range.
(set_fields): Record the range start index for an interval even
when it abuts another interval on its low side.
Also record the range start index of the longest right-open-interval.
2004-06-02 21:20:41 +00:00
Jim Meyering 3ce2931ad2 Add tests of --output-delimiter=S with abutting and overlapping byte ranges. 2004-06-02 21:20:23 +00:00
Jim Meyering 709978531b . 2004-06-02 08:54:32 +00:00
Jim Meyering 27d6dec23d New tests bs-055, bs-at-end, repeat-Compl.
Fix comment for range-a-a.
2004-06-02 08:50:42 +00:00
Jim Meyering c18814a736 *** empty log message *** 2004-06-02 08:50:30 +00:00
Jim Meyering a396e88106 (posix_pedantic): Remove; no longer needed since
we need to test this in just one place now.
(usage): Mention -C.
(unquote): Note that \055, \n, etc are escaped.
Do not worry about POSIXLY_CORRECT when warning about ambiguous
escape sequences.
\ at end of string stands for itself.
Do not diagnose invalid backslash escapes: POSIX says the behavior
is unspecified in this case, so we don't need to diagnose it.
(main): Add support for -C (currently an alias for -c).
Do not diagnose 'tr [:upper:] [:upper:], as POSIX does not require
a diagnostic here.
2004-06-02 08:50:24 +00:00
Jim Meyering 7a9884545c *** empty log message *** 2004-06-02 08:35:27 +00:00
Jim Meyering 733ceab1b8 (tr invocation): Mention -C. 2004-06-02 08:35:02 +00:00
Jim Meyering 17ccbf5907 *** empty log message *** 2004-06-01 17:12:44 +00:00
Jim Meyering 33f99919fd update from gnulib 2004-06-01 15:27:10 +00:00
Jim Meyering c74dc457eb *** empty log message *** 2004-06-01 15:24:15 +00:00
Jim Meyering 4041dbb5e4 Update from gnulib. 2004-06-01 15:24:11 +00:00
Jim Meyering 807984cc3f . 2004-06-01 14:28:25 +00:00
Jim Meyering 6d835b1811 *** empty log message *** 2004-06-01 14:18:08 +00:00