summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2006-11-18"ln --backup f f" produces a misleading diagnostic:Jim Meyering
ln: creating hard link `f' => `f': No such file or directory * src/ln.c (do_link): Give a better diagnostic in this unusual case. (do_link): Rename local: s/lstat_ok/dest_lstat_ok/. * tests/ln/Makefile.am (TESTS): Add hard-backup. * tests/ln/hard-backup: New test for the above.
2006-11-16* bootstrap.conf (gnulib_modules): Add sys_stat, since we use it directly too.Paul Eggert
* lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h. * m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4. * src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS): Omit unnecessary parenthesization of args. * src/od.c (EQUAL_BLOCKS): Likewise. * src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
2006-11-16* src/csplit.c (load_buffer): Plug an inconsequential leak.Jim Meyering
2006-11-16Help valgrind see that there is no leak in dd.c.Jim Meyering
* src/dd.c (dd_copy): Declare real_buf and real_obuf to be static, so we need not free them at all. This is easier than freeing both buffers at each of the early "return"s.
2006-11-13* src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.Jim Meyering
From Paul Eggert.
2006-11-13Plug another technically-unimportant leak in sort.Jim Meyering
* src/sort.c (main): Don't allocate memory for each new key here. (insertkey): Allocate memory for each key here, instead. (key_init): Rename from new_key. Don't allocate.
2006-11-13* src/sort.c (main): Plug a tiny memory leak.Jim Meyering
Move declaration of local "minus" down to be nearer point of use.
2006-10-28* src/c99-to-c89.diff: Update to reflect new offsets in rm.c.Jim Meyering
2006-10-26* src/system.h (ftello): Add a compile-time check for the highlyJim Meyering
unlikely condition of off_t narrower than long int, rather than handling it at run time. Based on a patch from Paul Eggert.
2006-10-25Portability to Tru64 V4.0.Jim Meyering
* src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]: Define inline replacement function. This (along with a yesterday's fix for autoconf's _AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
2006-10-25* src/cat.c (infile): Add "const" to declaration.Jim Meyering
* src/csplit.c (prefix): Likewise. * src/printf.c (cfcc_msg): Likewise. * src/tail.c (valid_file_spec): Likewise. * src/cut.c (cut_file): Likewise, for a parameter. * src/expr.c (str_value): Likewise. * src/fold.c (fold_file): Likewise. * src/pr.c (init_header): Likewise. * src/dircolors.c (dc_parse_stream): Likewise, for a local. * src/tr.c (make_printable_str): Likewise. * src/nl.c (body_type, header_type, footer_type, current_type): (separator_str, build_type_arg, nl_file): Likewise, for many. * src/paste.c (main): Don't assign a read-only string to 'optarg'. * src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
2006-10-25* src/c99-to-c89.diff: Update to reflect new offsets.Jim Meyering
2006-10-25new feature: rm accepts new option: --one-file-systemJim Meyering
Suggested by Steve McIntyre in <http://bugs.debian.org/392925>. * src/remove.h (struct rm_options) [one_file_system]: New member. * src/rm.c (rm_option_init): Initialize it. (usage): Document the option. * src/mv.c (rm_option_init): Likewise. * src/remove.c (remove_dir): With --one-file-system and --recursive, for each directory command line argument, do not affect a file system different from that of the starting directory. And give a diagnostic. * src/rm.c (ONE_FILE_SYSTEM): New enum. (main): Handle new option. * tests/rm/one-file-system: Test the above. * tests/rm/Makefile.am (TESTS): Add one-file-system. * tests/Makefile.am (check-root): Add the rm/one-file-system test to the list. (EXTRA_DIST): Add other-fs-tmpdir. * tests/mv/setup: Removed. Renamed to... * tests/other-fs-tmpdir: ...this new file. * tests/mv/Makefile.am (EXTRA_DIST): Remove setup. * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir. * tests/mv/backup-is-src: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/leak-fd: Likewise. * tests/mv/mv-special-1: Likewise. * tests/mv/part-fail: Likewise. * tests/mv/part-hardlink: Likewise. * tests/mv/part-rename: Likewise. * tests/mv/part-symlink: Likewise. * tests/mv/partition-perm: Likewise. * tests/mv/to-symlink: Likewise. * tests/mv/into-self-2: Likewise. [doc/ChangeLog] * coreutils.texi (rm invocation): Describe --one-file-system.
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.