summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'origin/next' into nextnextEric Blake2009-10-100-0/+0
|\
| * rm: avoid compiler warningEric Blake2009-09-051-1/+1
| | | | | | | | | | * src/remove.c (rm_fts): Don't allow fall-through when assertions are disabled.
| * euidaccess-stat: remove unnecessary macrosEric Blake2009-09-051-7/+0
| | | | | | | | | | * lib/euidaccess-stat.c (F_OK, R_OK, W_OK, X_OK): Delete; now guaranteed by gnulib.
| * rm: use gnulib faccessatEric Blake2009-09-053-9/+6
| | | | | | | | | | | | | | | | | | * 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.
| * NEWS: mention recent improvements in rmJim Meyering2009-09-051-0/+9
| |
| * rm: improve efficiency of rm -r (without -f) from O(N^2) to O(N)Jim Meyering2009-09-052-0/+10
| | | | | | | | | | | | | | 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.
| * build: placate gcc's new -Wskip-jump-initJim Meyering2009-09-052-38/+38
| | | | | | | | | | | | * 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.
| * rm: rewrite to use ftsJim Meyering2009-09-057-1497/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove.c: Don't include "unlinkdir.h"; no longer used. Do not include <setjmp.h> 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.
| * rm: record timing dataJim Meyering2009-09-052-0/+528
| | | | | | | | | | * README-rm-timing-compare: new file * README-rm-timing-2: New file.
* | rm: record timing dataJim Meyering2009-10-102-0/+528
| | | | | | | | | | * README-rm-timing-compare: new file * README-rm-timing-2: New file.
* | touch: optimize use of utimensEric Blake2009-10-101-36/+10
| | | | | | | | | | * src/touch.c (main): Use UTIME_NOW rather than calling gettime. (touch): Use UTIME_OMIT rather than stat.
* | copy: allow symlink timestamp preservation on more systemsEric Blake2009-10-103-12/+3
| | | | | | | | | | | | | | * src/copy.c (utimens_symlink): Simplify by using lutimens. * m4/jm-macros.m4 (coreutils_MACROS): Drop utimensat; gnulib does this for us. * tests/cp/preserve-slink-time: Recognize lutimes support.
* | build: update gnulib submodule to latest, for utimens improvementsEric Blake2009-10-101-0/+0
| |
* | maint: touch up previous LDADD patchEric Blake2009-10-101-1/+0
| | | | | | | | * src/Makefile.am (dir_LDADD): Delete; the ls_LDADD line covers this.
* | build: build uname(1) unconditionallyJim Meyering2009-10-102-3/+1
| | | | | | | | | | | | | | | | | | Before, on a system without the uname function, the build system would detect that and not build/install a uname program. Now that gnulib guarantees a uname function, ... * configure.ac: Don't check for the uname function. * src/Makefile.am (build_if_possible__progs): Move uname... (EXTRA_PROGRAMS): ...to this list.
* | maint: list program names one per lineJim Meyering2009-10-101-27/+116
| | | | | | | | | | * src/Makefile.am (EXTRA_PROGRAMS): List them one per line. (build_if_possible__progs): Likewise.
* | build: ls: fix link failure due to missing -laclJim Meyering2009-10-101-0/+1
| | | | | | | | | | * src/Makefile.am (ls_LDADD): Re-add $(LIB_ACL). Inadvertently-removed by commit 78c93601.
* | maint: touch up previous LDADD patchEric Blake2009-10-092-0/+6
| | | | | | | | | | | | * src/Makefile.am (stdbuf_LDADD): Add missing primer. (hostname_LDADD, uname_LDADD): Add GETHOSTNAME_LIB. * bootstrap.conf (gnulib_modules): Add uname.
* | maint: improve additional library trackingEric Blake2009-10-091-66/+178
| | | | | | | | | | * src/Makefile.am (LDADD): Refactor, to make per-library additions to individual programs easier to maintain.
* | chcon: don't disable just because SELinux is disabledJim Meyering2009-10-092-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * src/chcon.c (main): Now that gnulib provides getfilecon wrappers, we can revert most of the 2009-10-05 commit 3a97d664, "chcon: exit immediately if SELinux is disabled", since chcon is still useful as long as the file system provides handlers for the security.* name space. gnulib's getfilecon wrappers ensure that an offending context now evokes a return value of -1. Prompted by comments from Stephen Smalley in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18378/focus=18394 * NEWS (Bug fixes): Mention it.
* | ls: remove explicit getfilecon work-aroundJim Meyering2009-10-091-11/+0
| | | | | | | | | | * src/ls.c (gobble_file): Remove l?getfilecon work-around, now that the gnulib wrappers handle it for us.
* | build: update gnulib submodule to latest, for getfilecon wrappersJim Meyering2009-10-091-0/+0
| |
* | maint: use X2NREALLOC in more placesEric Blake2009-10-083-3/+3
| | | | | | | | | | | | | | * src/chroot.c (set_additional_groups): Use X2NREALLOC rather than x2nrealloc. * src/factor.c (emit_factor): Likewise. * src/setuidgid.c (main): Likewise.
* | maint: remove unused macros and declarationsEric Blake2009-10-082-62/+5
| | | | | | | | | | | | | | | | | | | | | | * src/system.h (EDQUOT, EISDIR, ENOSYS, EOVERFLOW, F_OK, X_OK) (W_OK, R_OK): Delete; macros provided by gnulib. (includes): Gnulib guarantees both <time.h> and <sys/time.h>, in either order. (free, malloc, memchr, realloc, getenv, lseek): Delete, gnulib guarantees these declarations. * m4/check-decl.m4 (gl_CHECK_DECLS): Delete checks now done by gnulib.
* | maint: move timeout exit statusesEric Blake2009-10-083-11/+4
| | | | | | | | | | | | | | | | * src/timeout.c (EXIT_TIMEDOUT, EXIT_CANCELED): Remove as macros... * src/system.h (EXIT_TIMEDOUT, EXIT_CANCELED): ...and provide as enum values instead. * src/stdbuf.c (EXIT_CANCELED): Delete.
* | stat: test recent patchEric Blake2009-10-082-0/+50
| | | | | | | | | | * tests/misc/stat-slash: New test. * tests/Makefile.am (TESTS): Run it.
* | stdbuf: improve path searchEric Blake2009-10-082-17/+12
| | | | | | | | | | | | * src/stdbuf.c (set_program_path): Use gnulib methods for better file name handling. * bootstrap.conf (gnulib_modules): Add xreadlink.
* | stat: work with recent gnulib changesEric Blake2009-10-081-1/+6
| | | | | | | | * src/stat.c (do_stat): Don't mask function-like stat macro.
* | stat: add support for many more file system typesJim Meyering2009-10-083-6/+58
| | | | | | | | | | | | | | | | | | | | * src/stat.c (human_fstype): Add the following FS types, from <linux/magic.h>: afs, anon-inode FS, btrfs, cgroupfs, cramfs-wend, debugfs, futexfs, inotifyfs, minux3, securityfs, selinux, xenfs. Also add "nilfs". * src/Makefile.am (fs-kernel-magic): New rule. * NEWS (Bug fixes): Mention this.
* | stat: recognize CIFS and HFS file system typesJim Meyering2009-10-083-7/+44
| | | | | | | | | | | | | | | | | | | | * src/stat.c (human_fstype) [CIFS, HFS]: Add new file system types. Prompted by a report from Stuart Kemp. Normalize the form of a few hexadecimal magic numbers. Alphabetize on S_MAGIC_ case names. * src/Makefile.am (fs-magic-compare, fs-def, fs-magic): New rules, to automate comparison of our list with that in the Linux statfs man page. * NEWS (Bug fixes): Mention it.
* | md5sum, sha*sum: also accept openssl checksum syntaxGuenter Knauf2009-10-074-5/+34
| | | | | | | | | | | | | | * src/md5sum.c (split_3): Accept openssl checksum syntax, which differs only by two spaces from that of the bsd checksum tools: openssl: MD5(f)= d41d8cd98f00b204e9800998ecf8427e bsd: MD5 (f) = d41d8cd98f00b204e9800998ecf8427e
* | maint: make release-making instructions more genericJim Meyering2009-10-061-12/+21
| | | | | | | | * README-release: Make instructions more generic.
* | post-release administriviaJim Meyering2009-10-063-2/+5
| | | | | | | | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* | version 8.0v8.0Jim Meyering2009-10-061-1/+1
| | | | | | | | * NEWS: Record release date.
* | build: update gnulib submodule to latestJim Meyering2009-10-061-0/+0
| |
* | chcon: exit immediately if SELinux is disabledOndřej Vašík2009-10-063-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change happens to avoid an abort in chcon when SELinux is disabled while operating on a file with an "unlabeled" context from back in 2006. However, that same abort can still be triggered by the same file when running chcon with SELinux enabled. This bug in chcon will be fixed in a subsequent commit via a getfilecon wrapper. See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/18378/focus=18384 for how to correct your disk attributes to avoid triggering this bug. * src/chcon.c (main): Exit immediately if SELinux is disabled. Reported in http://bugzilla.redhat.com/527142 by Yanko Kaneti. * src/runcon.c (main): Do not hardcode program name in error message. * THANKS: Update.
* | build: update gnulib submodule to latestJim Meyering2009-10-031-0/+0
| |
* | dircolors: highlight .cgm and .emf as imagesJames R. Van Zandt2009-10-022-0/+3
| | | | | | | | | | * src/dircolors.hin: Add .cgm, .emf. * THANKS: Update.
* | maint: remove obsolete syntax-check exclusionJim Meyering2009-10-021-1/+1
| | | | | | | | * cfg.mk (local-checks-to-skip): Remove strftime-check.
* | tail: avoid a race where we could miss new data with --pidPádraig Brady2009-10-023-29/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/tail.c (tail_forever, tail_forever_inotify): Close a race in tail_forever_inotify where new data written after the file check by a now dead process, but before the pid check, is not output. We use the POSIX guarantee that read() and write() are serialized wrt each other even in separate processes, to assume full file consistency after exit() and so poll for new data _after_ the writer has exited. This also allows us to not redundantly _wait_ for new data if the process is dead. * tests/tail-2/pid: Remove the now partially invalid sub second sleep check as we now don't unconditionally wait, and replace it with a check for the redundant sleep. Also clarify some of the existing comments. * NEWS: Mention the fix.
* | maint: move gnu-web-doc-update script to gnulibJim Meyering2009-10-022-41/+1
| | | | | | | | | | | | * bootstrap.conf (gnulib_modules): Add gnu-web-doc-update. Remove gendocs, since gnu-web-doc-update depends on it. * gnu-web-doc-update: Remove file, now that we get it from gnulib.
* | build: update gnulib submodule to latestJim Meyering2009-10-021-0/+0
| |
* | tests: tail-2/pid: use a 3-second timeout, not 1Jim Meyering2009-09-301-2/+2
| | | | | | | | | | | | | | | | | | * tests/tail-2/pid: When using the timeout program to ensuring that tail -s.1 --pid=$PID_T_MAX does not wait forever, use a timeout longer than 1 second. A 1-second timeout could be too short on a very busy system, and result in a timeout, and hence false-positive failure. 2009-09-30 Jim Meyering <meyering@redhat.com>
* | build: update gnulib submodule to latestJim Meyering2009-09-301-0/+0
| |
* | build: translate diagnostics from two new filesJim Meyering2009-09-301-0/+2
| | | | | | | | * po/POTFILES.in: Add two new files: lib/siglist.h, lib/strsignal.c
* | build: now that we use the lock module, don't exclude lock.m4Jim Meyering2009-09-301-1/+0
| | | | | | | | * bootstrap.conf: Don't exclude lock.m4.
* | ls: always print "?" for allocated size of a dereferenced dangling symlinkPádraig Brady2009-09-303-13/+18
| | | | | | | | | | | | | | | | | | | | Previously for `ls -Ls` (but not `ls -Lsl`), we referenced the st_blocks returned from the previous failed stat() call. This undefined value was seen to be 0 for dangling symlinks at least. * src/ls.c (print_file_name_and_frills, length_of_file_name_and_frills): Don't use st_blocks if the previous stat() failed * tests/ls/dangle: Add a test case * NEWS: Mention the fix, and roll up related items into a single entry.
* | build: use gnulib's freopen moduleJim Meyering2009-09-301-1/+3
| | | | | | | | | | | | | | | | | | * bootstrap.conf (gnulib_modules): Add freopen, strsignal, fsync. Exposed via make CFLAGS=-DGNULIB_POSIXCHECK 2>&1 \ |perl -lne '/.* use gnulib module (\S+).*/ and print $1' \ |sort |uniq -c|sort -nr (avoided_gnulib_modules): Don't avoid the "lock" module. Now it's required, as a dependency of the strsignal module.
* | stat: interpret "-" as standard inputJim Meyering2009-09-294-1/+57
| | | | | | | | | | | | | | | | | | * src/stat.c (do_stat): Interpret a command line argument of "-" to mean "standard input", like many other tools do. (do_statfs): Fail upon any attempt to use "-". * NEWS (Changes in behavior): Mention it. * tests/misc/stat-hyphen: New test, to exercise the above. * tests/Makefile.am (TESTS): Add misc/stat-hyphen.
* | ls: don't use an undefined struct stat after failed stat/lstatJim Meyering2009-09-292-3/+7
| | | | | | | | | | | | * src/ls.c (format_inode): Access f->stat only if f->stat_ok is set. * NEWS (Bug fixes): Mention it. Improved-by: Pádraig Brady <P@draigBrady.com>