summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2004-06-21.Jim Meyering
2004-06-21(main): Don't segfault when calculating theJim Meyering
expected number of operands for `mknod NAME'.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-21Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included. (do_copy): Likewise.
2004-06-21Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included. (add_file_name, main): Likewise.
2004-06-21Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included. (beyond, main): Likewise.
2004-06-20(input_seek_errno): Declare file-scoped variable as static.Jim Meyering
2004-06-20Remove declaration of yesno.Jim Meyering
Instead, include yesno.h.
2004-06-20Include yesno.h.Jim Meyering
(top_dir): Remove now-unnecessary cast of obstack_base. (pop_dir): Likewise. (full_filename_): Likewise.
2004-06-20Don't dump core if ctime returns NULL; this is possible onJim Meyering
hosts with 64-bit time_t and 32-bit int. Include "inttostr.h". (time_string): New function, copied from who.c. (print_entry): Use it.
2004-06-20Don't dump core if ctime returns NULL; this is possible onJim Meyering
hosts with 64-bit time_t and 32-bit int. Include "inttostr.h". (time_string): If ctime fails, print the raw time as an integer instead of dumping core.
2004-06-20(print_line): Don't truncate user names at 8 bytes.Jim Meyering
Problem reported by Guido Leenders in: http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00056.html
2004-06-19(case_GETOPT_VERSION_CHAR): Switch back to using GNU_PACKAGE (fromJim Meyering
PACKAGE) once again. This restores `GNU' to the parenthesized package name in --version output. Before, the first argument from AC_INIT, `GNU coreutils', would be propagated to the PACKAGE variable. Now, `GNU ' is trimmed. Reported by Richard Stallman.
2004-06-17(to_uchar): Rename function from `uchar'. The latterJim Meyering
would clash with a typedef in Tru64's <sys/types.h>. From Albert Chin.
2004-06-17.Jim Meyering
2004-06-17(main): Recognize --help and --version even if POSIXLY_CORRECT is set.Jim Meyering
2004-06-17(main): Handle "--".Jim Meyering
2004-06-15(main): Recognize --help, --version even ifJim Meyering
POSIXLY_CORRECT. POSIX does not specify any options, but it does not prohibit options either, so "unlink" is like "expr" here.
2004-06-15(parse_obsolescent_option): Support multiple file operandsJim Meyering
even if POSIXLY_CORRECT, since POSIX does not require a diagnostic.
2004-06-15(print_esc): Support \x, \u, \U even if POSIXLY_CORRECT,Jim Meyering
since POSIX says the behavior is unspecified here. (main): Recognize --help, --version even if POSIXLY_CORRECT. POSIX does not specify any options, but it does not prohibit options either, so "printf" is like "expr" here.
2004-06-15Include "hard-locale.h".Jim Meyering
(main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since POSIX specifies the behavior only in the POSIX locale.
2004-06-15(decode_switches): Pay attention to TABSIZE even if POSIXLY_CORRECTJim Meyering
is set. POSIX reserves upper-case environment variables to the implementation, so it's OK for ls to depend on TABSIZE.
2004-06-14Remove declaration of euidaccess.Jim Meyering
Instead, include "euidaccess.h".
2004-06-13(PIDSTR_DECL_AND_INIT): Don't assume pid_t fits in int.Jim Meyering
(UT_ID) [!HAVE_STRUCT_XTMP_UT_ID]: Remove bogus comment, as (sizeof "??") reliably returns 3. (print_line): Guard against idle and pid being too long (which is possible when printing headers). (print_user): Allocate enough bytes for idlestr. Use IDLESTR_LEN. Avoid unnecessary cast of sizeof to int. (make_id_equals_comment): Do not assume that UT_ID returns a string; it might return a non-null-terminated array. Use strncat instead. It's not very often where strncat is exactly what you want, but this is one of those rare cases.
2004-06-12(list_entries_who): Don't output a trailing space.Jim Meyering
2004-06-09(usage): Improve wording in description of the --time=WORD option.Jim Meyering
2004-06-09(change_file_owner): Change names of parametersJim Meyering
old_uid and old_gid to required_uid and required_gid respectively.
2004-06-09Adjust chmod and chown to be similar if -c or -v are given. InJim Meyering
particular, a no-op chown is no longer reported as a change; this reverts to previous behavior. Also, fix both commands so that -v report failures even if the failure is not due to the chmod or chown syscalls. * src/chown-core.c (change_file_owner): Return -1 on error, not 1 sometimes and -1 on others. Our caller ORs together our results, and (-1 | 1) == 0 on ones-complement hosts. With -v report all errors verbosely, not just some. Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent: file_stats wasn't set properly in that case.
2004-06-09(mode_changed): Return false, not 0, now that the function returns `bool'.Jim Meyering
2004-06-09Adjust chmod and chown to be similar if -c or -v are given. InJim Meyering
particular, a no-op chown is no longer reported as a change; this reverts to previous behavior. Also, fix both commands so that -v report failures even if the failure is not due to the chmod or chown syscalls. * src/chmod.c (CH_NOT_APPLIED): New constant. (describe_change): Handle it. (process_file): Use it, if a symlink wasn't changed. (mode_changed): Return bool, not int. Accept new argument NEW_MODE; all callers changed. This lets us avoid statting the file unless the new mode has unusual bits. (process_file): Return -1 on error. With -v, report all errors verbosely, not just some.
2004-06-08.Jim Meyering
2004-06-08.Jim Meyering
2004-06-08(change_file_owner): Use ent->fts_statp only ifJim Meyering
needed. Chown a directory only after chowning its children; this avoids problems if the new directory ownership doesn't permit access to the children. Dereference symlinks before doing ROOT_DEV_INO_CHECK, not after, so that we catch symlinks to /. Do not optimize away the chown() system call when the file's owner and group already have the desired value. POSIX does not permit this optimization. Rely on chown and lchown to do the right thing with symlinks and/or -1 arguments, now that we have wrappers to do this. Use ENOTSUPP not ENOSYS, and ignore all ENOTSUPP errors, not just command-line errors. (chown_files): Pass FTS_STAT to xfts_open if we don't need file status.
2004-06-08(main): Check for incompatible options. -R --dereferenceJim Meyering
requires either -H or -L, and -R -h requires -P. If -H, specify FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster. Make this file as much like chown.c as possible.
2004-06-08(main): Check for incompatible options. -R --dereferenceJim Meyering
requires either -H or -L, and -R -h requires -P. If -H, specify FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster. Make this file as much like chgrp.c as possible.
2004-06-08(ENOTSUP): Remove.Jim Meyering
2004-06-08(main): Fix typo introduced on 2003-05-10 thatJim Meyering
prevented a diagnostic of any operands.
2004-06-08.Jim Meyering
2004-06-08(direct_mode): Turn it on/off with directio, too.Jim Meyering
2004-06-07Enable direct-mode I/O (bypassing the buffer cache), if possible.Jim Meyering
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-06fix typo in commentJim Meyering
2004-06-06(main): "tr -d a b" is now a fatal error even if POSIXLY_CORRECT is set.Jim Meyering
The POSIX SYNOPSIS does not allow this option combination.
2004-06-04(dopass): Don't subtract 1 from the offset afterJim Meyering
a write error. Problem reported by Jon Peatfield in: http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html
2004-06-03Fix bug reported by Buciuman Adrian inJim Meyering
<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-02rm (without -f) could hang unnecessarily when attempting toJim Meyering
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-02Fix a bug in how the --output-delimiter=D option works withJim Meyering
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(posix_pedantic): Remove; no longer needed sinceJim Meyering
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-01.Jim Meyering
2004-06-01(main): Update use of xreadlink.Jim Meyering
2004-06-01(print_stat): Update use of xreadlink.Jim Meyering