Age | Commit message (Collapse) | Author |
|
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
|
|
|
|
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.
|
|
* 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.
|
|
Rewrite to avoid using temporary, $status.
|
|
* src/groups.sh: Don't hide a write failure.
Reported by Iain Calder <ic56@rogers.com>.
|
|
* src/chgrp.c (usage): Likewise. Suggestion from Jamie McClelland.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* src/chown-core.c: Likewise.
|
|
problem on Tandem reported by Matthew Woehlke in
<https://savannah.gnu.org/bugs/?17172>.
|
|
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.
|
|
invalid one, rather than just the part that contained the error.
|
|
* bootstrap.conf (gnulib_modules): Add savewd.
* src/install.c: Include savewd.h.
(process_dir): New function.
(main, install_file_in_file_parents): Use it, along with the new
savewd module, to avoid some race conditions.
* src/mkdir.c: Include savewd.h.
(struct mkdir_options): New members make_ancestor_function, mode,
mode_bits.
(make_ancestor): Return 1 if the resulting directory is not readable.
(process_dir): New function.
(main): Use it, along with new savewd module, to avoid some
race conditions. Fill in new slots of struct mkdir_options, so
that callees get the values.
* tests/install/basic-1: Test for coreutils 5.97 bug that was
fixed in coreutils 6.0, and which should still be fixed with
this change.
* tests/mkdir/p-3: Likewise.
|
|
Instead, since it's a little fragile, assert the condition.
(target_directory_operand): Update comment to reflect latest change.
|
|
|
|
|
|
it's own line.
(rm_1): Move declaration of "st" and new cache_stat_init call
"down" to nearer where they're used.
|
|
substr's last operand is very large. Performance problem reported
by Sebastian Kreft.
|
|
no file operand is given, and standard input is any FIFO.
|
|
where the first one names a directory and the second name ends in
a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
now succeeds, once more. This reverts part of the 2004-06-27
change for 5.3.0.
* NEWS: Say the above.
* src/mv.c (target_directory_operand): Don't require (here)
that the target operand "look like" a directory. This change
pushes the test down to the rename syscall level, where a
"mv dir existing-non-dir/" will mistakenly succeed on older systems
that ignore trailing slashes in the rename destination argument.
* src/cp.c (target_directory_operand): Likewise, but for cp.
* tests/mv/trailing-slash: Exercise the above fixes.
* tests/cp/trailing-slash: New file.
* tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
|
|
|
|
context from change of 2006-09-02.
|
|
(cache_fstatat, cache_stat_init): New functions.
(cache_statted, cache_stat_ok): New functions.
(write_protected_non_symlink): Remove struct stat ** buf_p arg,
which is no longer needed with the new functions. All callers
changed.
(prompt, is_dir_lstat, remove_entry, remove_dir):
New struct stat * arg. All callers changed.
(write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
(remove_cwd_entries, remove_dir, rm_1):
Use and maintain the file status cache.
(prompt, remove_entry): Omit the first "directory" in the diagnostic
"Cannot remove directory `foo': is a directory". This causes "rm"
to pass a test case that it would otherwise fail now that it
"knows" more about its argument. I think the diagnostic is better
without the first "directory" anyway.
(prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
(rm_1): Reject attempts to remove /, ./, or ../.
|
|
|
|
(usage, main): --preserve-root is now the default.
|
|
now.
(dot_or_dotdot): Succeed even if "." or ".." is followed by a
slash.
|
|
|
|
uintmax_t at the right time. Problem reported by Bruno.
|
|
than AC_REQUIREing, so that sys/mount.h isn't tested for after
the test result. I'm not sure why this fix is needed, but it
works.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Revamp to reflect better
what stat.c actually needs.
* src/stat.c: Include <stddef.h>
(alignof): New macro.
(HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
Remove.
(STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
(FSID_VAL): Remove.
(print_statfs): If f_fsid isn't an integer, grab its words one
at a time in little-endian order. This is a bit easier to configure
and should avoid a compilation failure on MacOS reported by Bruno
Haible.
|
|
work around a Mac OS X porting problem reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
(print_statfs): Use them.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for __val versus val
components of fsid. Omit some checks that stat.c doesn't care about.
|
|
* src/tail.c: Include isapipe.h.
(IS_PIPE_LIKE_FILE_TYPE): Remove.
(IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
tailable, since this seems to be portable.
(main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
|
|
it for us.
|
|
S_ISLNK are defined, since they're always defined now.
|
|
S_ISLNK are defined, since they're always defined now.
* src/cp.c (main): Likewise.
* src/ln.c (main): Likewise.
* src/ls.c (get_link_name, make_link_name): Likewise.
* src/mkfifo.c (usage): Likewise.
* src/who.c (S_IWGRP): Likewise.
|
|
* bootstrap.conf (gnulib_modules): Add fcntl.
* src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove. Other code
is already assuming these macros are defined.
(O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
(O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
Remove; the fcntl module now handles these.
|
|
* bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
(excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
* src/system.h: Don't bother to include <stdint.h>, since we can
now assume inttypes.h does the equivalent of including stdint.h.
|
|
component of the source name is "." or "..".
Reported by Andreas Schwab in https://savannah.gnu.org/bugs/?17540.
* tests/cp/src-base-dot: New file. Test for the above fix.
* tests/cp/Makefile.am (TESTS): Add src-base-dot.
|
|
(dot_or_dotdot): ...new static inline function.
* src/remove.c (rm_1): Reflect this renaming.
* src/ls.c (basename_is_dot_or_dotdot): Likewise.
|
|
Correct them.
|
|
|
|
since Automake supplies them for us. It always did -I$(srcdir),
and with the recent change to AC_CONFIG_HEADERS in configure.ac it
is now also doing -I../lib.
|
|
|
|
" (backup: foo.~1~)" suffix also when backing up a directory.
* NEWS: Report this bug fix.
* src/copy.c (emit_verbose): New function, factored out of...
(copy_internal): ...here. Use the new function.
* tests/mv/backup-dir: Test for the above fix.
|
|
|
|
no differently than regular directories on a file system with
dirent.d_type support.
* NEWS: Say the above.
* src/ls.c (gobble_file): With --color, also stat the file when
we know it is a directory.
Derived from an anonymous one-line fix and bug report:
<https://savannah.gnu.org/bugs/?15043>.
* tests/ls/color-dtype-dir: New file. Test for the above fix.
* tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
|
|
tarballs.
* bootstrap.conf: Add configmake, verify.
* lib/.cvsignore: Add configmake.h, stamp-h1.
* src/.cvsignore: Remove localedir.h.
* src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
subsumed by configmake.
* src/system.h: Include configmake.h rather than localedir.h
(LOCALEDIR): New macro.
|
|
|
|
(DEFAULT_PASSES, VERBOSE_UPDATE): Now constants, not macros.
(SECTOR_SIZE, SECTOR_MASK): New constants.
(fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
and use the SECTOR_* constants when applicable. Check for size <
0 rather than size == -1, since negative-size files are a sign of
trouble anyway.
(dopass): Assume a continuable error if EIO even if the current
position is not a multiple of 512.
|