summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2004-05-29(rm_option_init): Initialize new member,Jim Meyering
2004-05-29(rm_option_init): Initialize new member, x->require_restore_cwd.Jim Meyering
2004-05-29(struct rm_options) [require_restore_cwd]: New member.Jim Meyering
2004-05-29rm -r would get a failed assertion when run from an inaccessibleJim Meyering
directory and with two or more command line arguments including an absolute-named directory followed by a relative-named directory. (struct cwd_state): Define. (AD_pop_and_chdir): Redesign interface so that a restore_cwd failure can be detected by the caller. Instead of returning a malloc'd directory name, communicate it to caller via a new parameter, and return an indication of whether restore_cwd failed. Update caller. Eliminate an unnecessary call to AC_stack_top. (remove_dir): Change type of cwd_state parameter to `struct cwd_state' so we can now communicate to caller whether/how functions like restore_cwd have failed. Update caller. (rm_1): Fail if we've failed to restore the working directory and the name of the next file to remove is `.'-relative. (rm): Fail if the require_restore_cwd flag is true and we've failed to restore the working directory.
2004-05-29(text_buffer_maxend): Remove declarations unused variable.Jim Meyering
2004-05-28(push_dir): Merge declaration and adjacent assignment into a single statement.Jim Meyering
2004-05-28tweak a commentJim Meyering
2004-05-28(AD_mark_helper): Eliminate unnecessary comparison.Jim Meyering
2004-05-22(rm): Use free rather than XFREE.Jim Meyering
(remove_dir): Use xmalloc, not XMALLOC. (ds_init): Likewise.
2004-05-20Use translatable diagnostics, e.g.Jim Meyering
change "%s: remove" to _("%s: failed to remove") and change "%s: close" to _("%s: failed to close").
2004-05-18(names): Bring back lower-case letters, "_", andJim Meyering
".". But continue to omit +, =, %, @, #, as they're either shell metacharacters (for some shells) or are not in some character sets, or (in the case of '%') must be a metacharacter somewhere.
2004-05-17(cut_fields): Adjust to new signature of getndelim2.Jim Meyering
2004-05-17(incname): Decrement `len' only once per loop iteration.Jim Meyering
2004-05-17chgrp and chown now dereference symlinks by default, per POSIX.Jim Meyering
(usage): Update to reflect this.
2004-05-17(chopt_init): Affect each symlink referent by default.Jim Meyering
2004-05-16chown --dereference did nothing when the owner/group of aJim Meyering
symlink matched the desired owner/group. Reported by David Malone. Also reported in 1999 as http://bugs.debian.org/39642. (change_file_owner): When --dereference has been specified, and when processing a symlink, stat it to get the owner and group of the referent.
2004-05-16In shred, check for errors from fdatasync more carefully. IfJim Meyering
fdatasync fails with errno==EINVAL, it means this implementation does not support synchronized I/O for this file. Do not report this as an error, as (for example) AIX 5.2 fdatasync reports it for raw disk devices. Problem reported by Albert Chin in <http://mail.gnu.org/archive/html/bug-gnu-utils/2004-05/msg00028.html>. Check for write errors, though: the old code ignored them. Improve error checking in a few other cases, too (e.g., close of a directory). Also, change several 'int' values to 'bool', so that the error checking is a bit clearer. Similarly, change unsigned values to size_t where appropriate. * src/shred.c: Include "dirname.h". (datasync) [!HAVE_FDATASYNC]: Remove. (dosync): New function. (dopass): Use it. Return 1 on write error, -1 on other error. All callers changed. Report write error if dosync does. (do_wipefd, wipefd, wipename, wipefile): Return bool (true/false), not int (0/-1). All callers changed. Return false if there's a write error. (incname): Return bool (true/false), not int (0/1). Accept size_t length, not unsigned. All callers changed. Do not bother checking for non-digits; it can't happen. Replace recursion with iteration. (wipename): Use dir_name, base_name, etc. instead of assuming Unix file names. Use size_t for length, not unsigned. Report error if unlink or close fails. (wipename, main): Use bool for booleans. (names): Use only digits and uppercase letters, for greater portability.
2004-05-14(AD_pop_and_chdir): Eliminate an unnecessary call to AC_stack_top.Jim Meyering
2004-05-14.Jim Meyering
2004-05-14Improve performance of `sort -m' on large files, at the cost ofJim Meyering
making some contrived examples unsafe. POSIX allows this optimization. Performance problem reported by Jonathan Baker in <http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00071.html>. (first_same_file): Do not treat input pipes differently from other files.
2004-05-13(unquote, make_printable_str): Use e.g. '\a' rather than '\007',Jim Meyering
for portability to EBCDIC hosts.
2004-05-13(print_esc_char): Use e.g. '\a' rather than '\007',Jim Meyering
for portability to EBCDIC hosts.
2004-05-13(print_ascii, dump_strings): Use e.g. '\a' rather thanJim Meyering
'\007', for portability to EBCDIC hosts.
2004-05-13Don't assume that "make -C" works; Solaris "make" doesn't have -C.Jim Meyering
(all_programs.list): New rule, copied from man/Makefile.am and tests/Makefile.am, except that we use the system tr rather than ./tr and we don't use tr -s.
2004-05-12(AD_pop_and_chdir): Move lstat-`.' into if-blockJim Meyering
where the result is used. This avoids one unnecessary lstat call per command line argument.
2004-05-11Don't include "save-cwd.h". It's no longer used.Jim Meyering
2004-05-10(AD_push): Don't use errno in diagnostic about `changed dev/ino'.Jim Meyering
2004-05-09(unquote): Use xcalloc rather than xmalloc andJim Meyering
a loop initializing the just-allocated memory to zero.
2004-05-08Fix bug where "rm" gave up too easily, reported by Dan Jacobsen inJim Meyering
<http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00013.html>. (remove_entry): Check for errno values like ENOENT that show the file cannot be directory, instead of for errno values like EPERM that show the file might be a directory. This is necessary because, when a single unlink() call has multiple reasons to fail, it can set errno to any of those reasons; it's only the rare errno value like ENOENT that excludes all the other possible reasons to fail even when the file is a directory. (remove_cwd_entries): Don't attempt chdir if the file is known to not be a directory. (remove_dir): Use the same method that remove_cwd_entries uses (for some reason they differed). Don't assert that saved_errno must be EPERM; it might be just about anything.
2004-05-06(main): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-06(main): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-06(list_entries_users): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-06(do_wipefd): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-06(xgetgroups): Use variable name, rather than type name in computing bufferJim Meyering
size for xnmalloc.
2004-05-06(xgetgroups): Use xnmalloc, rather than xmalloc.Jim Meyering
Don't add `1' to the buffer size (it was to protect against malloc implementations that fail to allocate a buffer of size zero). That is no longer necessary, since we use a malloc wrapper on such systems.
2004-05-06(main): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-06(elide_tail_bytes_pipe): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-06(get_input_fstatus): Use xnmalloc, rather than xmalloc.Jim Meyering
2004-05-04(show_disk, show_point): If several filesystems areJim Meyering
mounted on the same mount point, prefer the last one, not the first. Problem reported by Christian Jones in <http://mail.gnu.org/archive/html/bug-coreutils/2004-04/msg00200.html>. (show_disk): Remove unused statp arg. Return bool, not int. (show_point): Rewrite to avoid gotos. Use the same algorithm for lofs and dummies for each pass through the mount table, rather than subtly different algorithms (which are probably inadvertent).
2004-05-03.Jim Meyering
2004-05-01When chown or chgrp is modifying the referent of a symlink,Jim Meyering
use the chown(2) function, if possible. (change_file_owner): Don't hard-code the open/fchown/close kludge here. Use `chown' instead. The chown function works just fine on conforming systems. Other systems now go through the new chown wrapper that resorts to the old kludge.
2004-05-01(change_file_owner): Add a comment.Jim Meyering
2004-04-29.Jim Meyering
2004-04-27.Jim Meyering
2004-04-27(syntax_table, re_syntax_table): Remove declarations of two unusedJim Meyering
variables (they were exposed by the above change).
2004-04-27Make over 40 global extern variables `static'.Jim Meyering
2004-04-27(sc_tight_scope): Also check for global variables, (BSS section).Jim Meyering
2004-04-27Rename to sc_tight_scope.Jim Meyering
2004-04-27(backup_type): Declare `static'.Jim Meyering
2004-04-27(opt_nul_terminate_output): Declare `static'.Jim Meyering