summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2006-10-21* .gitignore: Remove some references to files in subdirectories.Jim Meyering
* build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files. * m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
2006-10-21* src/copy.c (copy_internal): Add a comment saying why we preferJim Meyering
mknod over mkfifo.
2006-10-20Enable an fts optimization (call lstat only for directories,Jim Meyering
on some file system types) also with the --preserve-root option of chown or chgrp. * src/chown-core.c (change_file_owner): Compare fts_statp-based dev/ino against root dev/ino only for directories. (chown_files): Don't let the root_dev_ino setting influence whether we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
2006-10-20* src/od.c (usage): Change description of default to use "-w16",Jim Meyering
not the now-invalid "-w 16" syntax. From Dan Jacobson.
2006-10-19* src/copy.c (copy_reg): Rewrite slightly to avoid duplicte codePaul Eggert
when opening dst_name. (copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain (SYSCALL) to test for failure in a system call.
2006-10-18* src/copy.c (copy_internal): Use mknod rather than mkfifo to copyPaul Eggert
a fifo. This preserves the special mode bits on Solaris 10, which is compatible with what Solaris 10 cp -R does.
2006-10-18* src/copy.c (copy_internal): Remove redundant and confusing localPaul Eggert
variable src_type.
2006-10-18* src/copy.c (copy_internal): Don't pass mkdir a mode greater thanPaul Eggert
7777. This matches historical 'cp' behavior and avoids some (though not all) implementation-defined behavior of mkdir. * src/cp.c (make_dir_parents_private): Likewise. * src/copy.c (copy_internal): Don't pass 'open' a mode greater than 777. This is required by POSIX. It doesn't make any difference in actual behavior on any host that I know of.
2006-10-17* src/dd.c (usage): Use two spaces (not one) to separate theJim Meyering
"fdatasync" option string from its description, so help2man formats the derived man page properly. Reported by Samuel Thibault in <http://bugs.debian.org/393649>.
2006-10-16* src/groups.sh (version): Reword message to match the other programs.Paul Eggert
Problem reported by Eric Blake.
2006-10-14* src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.Jim Meyering
Instead, include "exit.h". This hereby retires the work-around for "Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
2006-10-14* src/cksum.c (uint_fast32_t): Don't define.Jim Meyering
Instead, include <stdint.h>.
2006-10-14* src/pinky.c: Don't include stat-macros.h; system.h already does it.Jim Meyering
2006-10-14* src/pinky.c (S_IWGRP): Don't define.Jim Meyering
Instead, include "stat-macros.h".
2006-10-14* NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2Jim Meyering
to dir1/dir2~. * src/copy.c (copy_internal): Although we do create a backup of each destination directory when in move mode, don't do that when copying. Reported by Peter Breitenlohner, in <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>. * tests/cp/backup-dir: New file. Test for the above.
2006-10-13More chown/chgrp dereferencing-related fixes.Jim Meyering
* src/chown-core.c (change_file_owner): Don't use fts_statp if we're dereferencing symlinks. Reverse conjuncts, so that we use dereference file_stats (aka ent->fts_statp) only *after* we've confirmed that chopt->affect_symlink_referent is true. Otherwise, we might use ent->fts_statp uninitialized. Don't turn on FTS_NOSTAT when dereferencing symlinks. * tests/chown/deref: Update the expected diagnostic, now that this test case (trying to use "chown --dereference ..." on a dangling symlink) takes a different code path.
2006-10-13* src/chown-core.c (change_file_owner): Use fstatat, not stat,Jim Meyering
now that we're using fts_open with FTS_CWDFD. * tests/chgrp/posix-H: Add --preserve-root to an invocation of chgrp, to exercise the above fix.
2006-10-13* src/du-tests: Clean up a little, though it's still not portable.Jim Meyering
2006-10-12* configure.ac: Avoid compiler warnings about default returnJim Meyering
type in function definitions and unused variables in tests. * src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed if this is #defined.
2006-10-11* src/ls.c (usage): Correct description of -s, --size.Jim Meyering
It works even without -l. Suggestion from Karl Berry.
2006-10-10* src/ls.c (quote_name): Use initializer rather than memset toPaul Eggert
initialize an object to zero. This is easier to read and is less likely to introduce an runtime error due to a mixup. It causes gcc -W to issue a warning, but you can work around this by appending -Wno-missing-field-initializers. * src/pathchk.c (portable_chars_only): Likewise. * src/shred.c (main): Likewise. * src/stty.c (main): Likewise. * src/tr.c (card_of_complement): Likewise. * src/wc.c (wc): Likewise.
2006-10-09* src/sort.c (usage): Mention again that sort fields are origin 1.Paul Eggert
2006-10-09Avoid a compiler warning.Jim Meyering
* src/pathchk.c (portable_chars_only): Initialize variable of type mbstate_t via memset, rather than via '{0}'. Patch from Bruno Haible.
2006-10-07* src/install.c (make_ancestor): New arg COMPONENT.Paul Eggert
* src/mkdir.c (make_ancestor): Likewise. * tests/install/basic-1: Check for install -Dv bug.
2006-10-06Fix bug reported today by Mike Frysinger: mkdir -pv is logging thePaul Eggert
wrong file name in some cases. * src/install.c (struct install_options): New type. (install_file_in_file_parents, main): Use it instead of struct cp_options. (process_dir): Remember the full name. (announce_mkdir, make_ancestor): Use the full name in announcements. * src/mkdir.c (struct mkdir_options): Add full_name member. (make_ancestor): Use the full name in announcements. (process_dir): Remember the full name. * tests/mkdir/Makefile.am (TESTS): Add p-v. * tests/mkdir/p-v: New file, to test this bug.
2006-10-06* src/c99-to-c89.diff: Update to reflect new offsets.Jim Meyering
2006-10-05* src/chgrp.c: Don't include lchown.h; no longer needed.Paul Eggert
* src/chown.c: Likewise.
2006-10-05* src/dd.c (flags): noatime and nofollow now depend onPaul Eggert
HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too. (usage): Output info about noatime and nofollow only if they are known to work. * src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather than O_NOFOLLOW, when testing whether it's possible to avoid a race condition reliably.
2006-10-03* src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4Paul Eggert
MiB, since XFS hosts can legitimately have large values of st_blksize. Problem reported by Tony Ernst in <http://savannah.gnu.org/bugs/?17903>.
2006-10-03* src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.Jim Meyering
Paul Eggert pointed out that the specified file may exist, in spite of such an errno value. * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long. * tests/rm/ignore-name-too-long: Remove file.
2006-10-03* src/c99-to-c89.diff: Convert two c99'isms -- one in remove.cJim Meyering
and one in shred.c -- that were added before coreutils-6.3. Reported by Michael Deutschmann.
2006-10-03* src/c99-to-c89.diff: Update to reflect new offsets.Jim Meyering
2006-10-03* src/remove.c (remove_entry): With -f, exit successfully in spiteJim Meyering
of a missing file under some very unusual conditions (with errno being any of ENOENT, ENOTDIR, ENAMETOOLONG).
2006-10-03With --force (-f), rm no longer fails for ENOTDIR.Jim Meyering
* src/remove.c (ignorable_missing): New function. Use it everywhere, rather than open-coding the test. Andreas Schwab reported the ENOTDIR problem. (ignorable_missing): Similarly, don't fail for ENAMETOOLONG. * NEWS: Mention the bug fix. * tests/rm/ignorable: New file. Test for the ENOTDIR case. * tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG. * tests/rm/Makefile.am (TESTS): Add the new file names.
2006-09-30* src/c99-to-c89.diff: Update offsets.Jim Meyering
2006-09-29* src/shuf.c (read_input): Fix an off-by-one error thatJim Meyering
would cause an infloop for piped input of 8KB or more. * NEWS: Mention the fix. * tests/misc/shuf: Test for the above fix.
2006-09-29[ChangeLog]Jim Meyering
Since any system may be affected by the Darwin readdir bug, perform the extra rewinddir unconditionally. The performance impact of rewinding a directory is negligible. * src/remove.c (NEED_REWIND): Define to use CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally. [m4/ChangeLog] * readdir.m4: Remove file once again. * jm-macros.m4: Remove reference to gl_FUNC_READDIR.
2006-09-29Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+Jim Meyering
and NFS, whereby rm would not remove all files in a directory. * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10. (NEED_REWIND): New macro, so that we incur the cost of the work-around rewinddir only on afflicted systems. * NEWS: Clarify and correct. * tests/rm/readdir-bug: New file. Test for the above fix. * tests/rm/Makefile.am (TESTS): Add it. Prompted by testing and analysis from Bruno Haible: http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2006-09-26* src/c99-to-c89.diff: Update offsets.Jim Meyering
2006-09-26* NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that keptJim Meyering
it from removing a directory containing 188 or more entries. * src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by 20, go work around the buggy readdir on Darwin 8.6.1 with NFS. Reported by Matthew Woehlke.
2006-09-26[ChangeLog]Paul Eggert
* NEWS: "groups user" no longer outputs "user :"; you need at least two users. "groups" now processes options like --help more compatibly. * src/groups.sh: Implement the option-processing change. Handle user and group names with special characters more robustly. Report write errors instead of exiting silently with status 1. [doc/ChangeLog] * coreutils.texi (groups invocation): "groups" no longer prefixes the output with "user :" unless more than one user is specified.
2006-09-26* src/groups.sh: When invoked with 0 or 1 argument, just exec "id".Jim Meyering
Rewrite to avoid using temporary, $status.
2006-09-26* NEWS: Mention the bug fix.Jim Meyering
* src/groups.sh: Don't hide a write failure. Reported by Iain Calder <ic56@rogers.com>.
2006-09-25* src/chown.c (usage): Clarify --dereference description.Jim Meyering
* src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
2006-09-24* NEWS: Mention these fixes.Jim Meyering
* src/copy.c (copy_reg): With --verbose (-v), print "removed `file_name'" just after unlinking a file. (copy_internal): Likewise, in three more places. Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
2006-09-20* NEWS: Document fix for cp -i and mv -i.Paul Eggert
* src/copy.c (copy_internal): With -i, prompt even if the source is a directory and the destination is not. This is required by POSIX and gives the user a chance to bail out before failing. * tests/cp/Makefile.am (TESTS): Add cp-i. * tests/cp/cp-i: New file. * tests/mv/Makefile.am (TESTS): Add i-5. * tests/mv/i-5: New file.
2006-09-20Fix the 2006-09-18 bug differently.Jim Meyering
* src/chmod.c: (process_file): Upon FTS_NS for a top-level file, tell fts_read to stat the file again, in case it has become accessible since the initial fts_open call. * src/chown-core.c (change_file_owner): Likewise.
2006-09-20* src/chmod.c: Revert last change. There is a better way.Jim Meyering
* src/chown-core.c: Likewise.
2006-09-19* src/ln.c (target_directory_operand): Rewrite to avoid portingPaul Eggert
problem on Tandem reported by Matthew Woehlke in <https://savannah.gnu.org/bugs/?17172>.
2006-09-18Fix bug where chmod, chown, and chgrp did not process operandsPaul Eggert
left-to-right in some cases. * src/chmod.c (wd_errno): New var. (chmod_file): New function, with most of the contents of the old prcess_file function. (process_files): Use it. This gives file names to fts one at a time, so that they are processed left-to-right as POSIX requires. * src/chown-core.c (wd_errno, chown_files): Likewise. (chown_file): New function. * tests/install/basic-1: Redo test so as to not workaround the chmod bug, thereby testing for it.