<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/remove.c, branch v6.5</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v6.5</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v6.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2006-10-24T22:01:33Z</updated>
<entry>
<title>new feature: rm accepts new option: --one-file-system</title>
<updated>2006-10-24T22:01:33Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-10-24T22:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5e42576c017905627e209acc20bf6e6abd1db6ef'/>
<id>urn:sha1:5e42576c017905627e209acc20bf6e6abd1db6ef</id>
<content type='text'>
Suggested by Steve McIntyre in &lt;http://bugs.debian.org/392925&gt;.
* 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.
</content>
</entry>
<entry>
<title>* src/dd.c (flags): noatime and nofollow now depend on</title>
<updated>2006-10-05T21:39:12Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-10-05T21:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1fa3b5014035f324ddec26576c0283d00bfbbbef'/>
<id>urn:sha1:1fa3b5014035f324ddec26576c0283d00bfbbbef</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>* src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.</title>
<updated>2006-10-03T22:06:31Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-10-03T22:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a1da4a039d45f3442ddd61249d76bfd7d0382a5b'/>
<id>urn:sha1:a1da4a039d45f3442ddd61249d76bfd7d0382a5b</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>* src/remove.c (remove_entry): With -f, exit successfully in spite</title>
<updated>2006-10-03T13:32:55Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-10-03T13:32:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9ac369c2bdea688a5147215440587b03da992535'/>
<id>urn:sha1:9ac369c2bdea688a5147215440587b03da992535</id>
<content type='text'>
of a missing file under some very unusual conditions (with errno
being any of ENOENT, ENOTDIR, ENAMETOOLONG).
</content>
</entry>
<entry>
<title>With --force (-f), rm no longer fails for ENOTDIR.</title>
<updated>2006-10-03T13:13:09Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-10-03T13:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=da9541f18e6985593b73c30d121605e8cff62a7b'/>
<id>urn:sha1:da9541f18e6985593b73c30d121605e8cff62a7b</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>[ChangeLog]</title>
<updated>2006-09-29T15:58:04Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-09-29T15:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=31c77a2fde27888aead246cde6eb88724450e5e1'/>
<id>urn:sha1:31c77a2fde27888aead246cde6eb88724450e5e1</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+</title>
<updated>2006-09-29T09:54:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-09-29T09:54:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a4d470409f5590b95d33ab67e5866ab71e4f0e27'/>
<id>urn:sha1:a4d470409f5590b95d33ab67e5866ab71e4f0e27</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>* NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept</title>
<updated>2006-09-26T20:42:43Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-09-26T20:42:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a86a56f7d101fbdeed6a64eb6b351ba67bfa5d05'/>
<id>urn:sha1:a86a56f7d101fbdeed6a64eb6b351ba67bfa5d05</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>* src/remove.c (remove_dir): Move new cache_stat_init call onto</title>
<updated>2006-09-11T13:22:04Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-09-11T13:22:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=75b99e8f20be498c1e87ea57a8db0a8afafb9eb6'/>
<id>urn:sha1:75b99e8f20be498c1e87ea57a8db0a8afafb9eb6</id>
<content type='text'>
it's own line.
(rm_1): Move declaration of "st" and new cache_stat_init call
"down" to nearer where they're used.
</content>
</entry>
<entry>
<title>Don't include dirname.h, since system.h does it now.</title>
<updated>2006-09-03T02:54:51Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-09-03T02:54:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e5fc4f24aae41c3028c1dff46f00a103db5bfd44'/>
<id>urn:sha1:e5fc4f24aae41c3028c1dff46f00a103db5bfd44</id>
<content type='text'>
(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 ../.
</content>
</entry>
</feed>
