<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/remove.c, branch v8.3</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.3</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-01-01T13:06:47Z</updated>
<entry>
<title>maint: update all FSF copyright year lists to include 2010</title>
<updated>2010-01-01T13:06:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-01T09:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1aa17dc89b3f313697661541adca0aa0defbdc09'/>
<id>urn:sha1:1aa17dc89b3f313697661541adca0aa0defbdc09</id>
<content type='text'>
Use this command:
git ls-files | grep -v COPYING \
  | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      build-aux/update-copyright
</content>
</entry>
<entry>
<title>rm: fix --one-file-system regression due to fts conversion</title>
<updated>2009-12-19T01:14:07Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-12-18T12:26:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d64c186d8e28d99ece16e591f6823a1da904ac44'/>
<id>urn:sha1:d64c186d8e28d99ece16e591f6823a1da904ac44</id>
<content type='text'>
* src/remove.c (rm_fts): Fix incorrect comparison of
device and inode numbers.
* tests/rm/one-file-system2: Add a separate test so
that it can be run as a normal user (It doesn't need to mount).
* tests/Makefile.am: Reference it.
* NEWS: Mention the fix.
Reported by Jan Larres.
</content>
</entry>
<entry>
<title>maint: factor out cycle warning, now that du will use it, too</title>
<updated>2009-11-05T07:32:31Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-05T07:32:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=38cb824673a53062ab0d2ee843cdf58affc17e04'/>
<id>urn:sha1:38cb824673a53062ab0d2ee843cdf58affc17e04</id>
<content type='text'>
* src/system.h (emit_cycle_warning): Define.  Factored out of...
* src/remove.c (rm_fts): ...here.  Use the new macro.
</content>
</entry>
<entry>
<title>rm -f: ignore EROFS when it's really ENOENT</title>
<updated>2009-11-03T13:14:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-03T11:01:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7bf2e3db23bd0a9ed59d95a683edd188fa52a033'/>
<id>urn:sha1:7bf2e3db23bd0a9ed59d95a683edd188fa52a033</id>
<content type='text'>
rm -f must not print a diagnostic for a nonexistent file.  However,
most linux-based kernel unlinkat functions set errno to EROFS when
the named file (regardless of whether it exists) would lie on a
read-only file system.  remove.c now performs an extra fstatat call
in that case, to determine whether the file exists.
* src/remove.c (excise): Map EROFS to ENOENT, if a file is nonexistent.
Reported by Steven Drake in &lt;http://savannah.gnu.org/bugs/?27923&gt;.
* NEWS (Changes in behavior): Mention it.
</content>
</entry>
<entry>
<title>rm: avoid compiler warning</title>
<updated>2009-09-11T12:08:58Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-09-04T04:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=398749b0cc49773320e6bc56eafabe7e85437412'/>
<id>urn:sha1:398749b0cc49773320e6bc56eafabe7e85437412</id>
<content type='text'>
* src/remove.c (rm_fts): Don't allow fall-through when assertions
are disabled.
</content>
</entry>
<entry>
<title>rm: use gnulib faccessat</title>
<updated>2009-09-11T12:08:58Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-09-04T03:59:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c7563435034fe72cb7fa4f8129062f18eef2906d'/>
<id>urn:sha1:c7563435034fe72cb7fa4f8129062f18eef2906d</id>
<content type='text'>
* bootstrap.conf (gnulib_modules): Add faccessat.  Replace strdup
with strdup-posix.
* m4/jm-macros.m4 (coreutils_MACROS): Revert previous change, now
that gnulib does it for us.
* src/remove.c (write_protected_non_symlink): Use faccessat in
more situations.
</content>
</entry>
<entry>
<title>rm: improve efficiency of rm -r (without -f) from O(N^2) to O(N)</title>
<updated>2009-09-11T12:08:58Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-03T13:15:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=722287e443c93e04e724e2812857a395cfab0b60'/>
<id>urn:sha1:722287e443c93e04e724e2812857a395cfab0b60</id>
<content type='text'>
where N is the depth of the deepest hierarchy rm is processing.
* src/remove.c (write_protected_non_symlink): Use faccessat to
avoid O(N)-per-entry cost of calling euidaccess.
* m4/jm-macros.m4 (coreutils_MACROS): Check for faccessat.
* NEWS (Improvements): Mention it.
</content>
</entry>
<entry>
<title>build: placate gcc's new -Wskip-jump-init</title>
<updated>2009-09-11T12:08:58Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-15T15:22:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9966c92dd4851db611ad88fc1eb68b01fffcaea3'/>
<id>urn:sha1:9966c92dd4851db611ad88fc1eb68b01fffcaea3</id>
<content type='text'>
* remove.c (rm_fts): Put braces around each of the two offending blocks.
* configure.ac: Don't turn off -Wjump-misses-init.
With the rewrite of remove.c, it is no longer needed.
</content>
</entry>
<entry>
<title>rm: rewrite to use fts</title>
<updated>2009-09-11T12:08:51Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-07-12T16:15:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4f73ecaf7def2a7bdc381eee2036f6539df01e7d'/>
<id>urn:sha1:4f73ecaf7def2a7bdc381eee2036f6539df01e7d</id>
<content type='text'>
* remove.c: Don't include "unlinkdir.h"; no longer used.
Do not include &lt;setjmp.h&gt; or "cycle-check.h".  Likewise.
Include "xfts.h".
(dir_name, dir_len): Remove definitions.
(CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Likewise.
(INODE_SORT_DIR_ENTRIES_THRESHOLD, NEED_REWIND, D_TYPE): Likewise.
(struct dirstack_state, Dirstack_state): Likewise.
(g_buf, g_n_allocated): Remove declarations.
(hash_freer, hash_compare_strings, rm_malloc): Remove functions.
(rm_free, push_dir, top_dir, pop_dir, right_justify): Likewise.
(full_filename0, xfull_filename, full_filename_): Likewise.
(AD_stack_height, AD_stack_top, AD_stack_pop, AD_stack_clear): Likewise.
(obstack_init_minimal, ds_init, ds_clear, ds_free): Likewise.
(AD_pop_and_chdir, AD_ensure_initialized, AD_mark_helper): Likewise.
(AD_mark_as_unremovable, AD_mark_current_as_unremovable): Likewise.
(AD_push_initial, AD_push, AD_push, AD_is_removable): Likewise.
(write_protected_non_symlink): Change 3rd parameter from
dirstack_state "ds" to full_name.
(prompt): Adjust parameters.  Now, state comes from FTS/FTSENT pair.
Those replace fd_cwd and "ds".  Remove "filename".  Remove pdirent_type
in favor of new "is_dir" parameter.  Rename is_empty to is_empty_p.
(DO_RMDIR, DO_UNLINK): Remove definitions.
(remove_entry, fd_to_subdirp, compare_ino): Remove functions.
(dirent_count, dirent_inode_sort_may_be_useful): Likewise.
(preprocess_dir): Likewise.
(fts_skip_tree, mark_ancestor_dirs, excise, rm_fts): New functions.
(remove_cwd_entries, remove_dir, rm_1): Remove functions.
(rm): Rewrite as a simple loop calling fts_read and dispatching
each entry via rm_fts.
* src/rm.c (main): Adapt to new signature of rm().
* bootstrap.conf (gnulib_modules): Remove unlinkdir, no longer used.
* src/Makefile.am (sc_tight_scope): Also recognize an extern "enum"
declaration.
* tests/rm/empty-name: Adjust expected output to match new diagnostic.
* NEWS (Improvements): Mention it.
</content>
</entry>
<entry>
<title>build: avoid unused variable warnings on cygwin</title>
<updated>2009-08-28T18:56:53Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-08-28T17:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=359fa92f2a08991f261fad12b5a1809cff108e9b'/>
<id>urn:sha1:359fa92f2a08991f261fad12b5a1809cff108e9b</id>
<content type='text'>
* src/copy.c (clone_file, copy_attr_by_fd, copy_attr_by_name):
Mark up unused variables.
* src/remove.c (dirent_inode_sort_may_be_useful): Likewise.
</content>
</entry>
</feed>
