summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2002-07-16(print_it): Use memcpy and a little pointer arithmetic, rather than stpncpy.Jim Meyering
2002-07-15Include sys/sysctl.h.Jim Meyering
(print_uptime): Add support for determining the boot time on FreeBSD.
2002-07-15(print_uptime): Use STREQ in place of !strcmp.Jim Meyering
2002-07-15Remove unnecessary uses of `defined' whenJim Meyering
operating on `HAVE_...' symbols. Remove unnecessary parentheses.
2002-07-14Under some circumstances, rm would fail due to a lack ofJim Meyering
permissions, but give a misleading diagnostic like this: rm: cannot chdir from `.' to `foo': Not a directory (remove_dir): Detect the case in which unlinking a non-directory fails with EPERM, and give an appropriate diagnostic.
2002-07-13(print_it): Use xstrdup, not strdup.Jim Meyering
Use strspn to avoid an explicit loop. Use fputc rather than printf "\n". Include quote.h. (print_stat): Use xreadlink, rather than using readlink directly. Use the quote function rather than hard-coded double quotes. Use error, not perror.
2002-07-10(show_dev): Make the `Use%' column align withJim Meyering
its heading, even when -P is used with -h or -H.
2002-07-10update copyrightJim Meyering
2002-07-10(usage) [--exclude]: Use PATTERN rather than PAT.Jim Meyering
2002-07-09(euidaccess): Remove declaration. It was unused. From Michael Stone.Jim Meyering
(yesno): Remove declaration. It too was unused.
2002-07-08df now rounds all quantities up, as per POSIX.Jim Meyering
This fixes a bug where df would report Size < Used. (df_readable): Omit last arg; we always round up now. All callers changed.
2002-07-08(uninstall-local): Search for @GNU_PACKAGE@,Jim Meyering
rather than the hard-coded `sh-utils'.
2002-07-08(enum time_style): Remove posix_iso_time_style.Jim Meyering
Add long_iso_time_style. (time_style_args, time_style_types, decode_switches): Likewise. (decode_switches): If a time style is prefixed by "posix-", ignore it if in the POSIX locale. Default style is now posix-long-iso. (usage): Explain the above.
2002-07-06Remove everything associated with --secure option.Jim Meyering
2002-07-04(prompt): Fix test for write-protectedness to alsoJim Meyering
check errno == EACCES. Otherwise, `rm dangling-symlink' would mistakenly prompt.
2002-07-03(usage): Rename --link/-l to --dereference/-L.Jim Meyering
Describe --secure. Describe --format. (main): Support -L. Deprecate -l.
2002-07-02add link and unlinkJim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-07-02(.sh): Also substitute @PACKAGE_BUGREPORT@.Jim Meyering
2002-07-02(usage_help): Use @PACKAGE_BUGREPORT@, rather than hard-coding aJim Meyering
deprecated address.
2002-07-02(usage): Use @PACKAGE_BUGREPORT@, rather than hard-coding a deprecated address.Jim Meyering
2002-07-02(usage): Mention that the expansions of %p and %P areJim Meyering
empty in many locales. From matthew arnison.
2002-07-01*** empty log message ***Jim Meyering
2002-06-29(print_statfs): Use `fputc ('*', stdout)'Jim Meyering
instead of the combination of strcat and printf. (print_statfs) [!FLASK_LINUX]: Print `*' for %S and %C, rather than `S' and `C'. (print_stat) [!FLASK_LINUX]: Likewise.
2002-06-29(AD_mark_current_as_unremovable): Replace dead code with an assertion.Jim Meyering
2002-06-25(prompt): Add a comment to help translators workJim Meyering
around the problem of making the translations of the adjective `write-protected' and the corresponding run-time-variable noun (e.g., file, directory, symlink, etc.) consistent. From Paul Eggert.
2002-06-24(usage): Add missing open-quote.Jim Meyering
2002-06-21Include sys/statvfs.h.Jim Meyering
[!HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H]: Include sys/param.h and sys/mount.h, to get decl of struct statfs on NetBSD 1.5.2. (NAMEMAX_FORMAT, STRUCT_STATVFS): Define. (HAVE_STRUCT_STATXFS_F_TYPE, SB_F_NAMEMAX): Define. Remove `static' attribute from decl of program_name. (human_fstype): Use f_basetype or f_fstypename if available. (print_human_time): Use nstrftime and an ISO format string, in place of strftime with `%c'. The latter is too locale-dependent. (print_statfs): Deal with lots of portability issues: some fields are available only with statfs, others only with statvfs, and some are available in both, but with different types. (do_statfs) [DEFAULT_FORMAT_TERSE]: Factor out. [DEFAULT_FORMAT_VERBOSE]: Likewise.
2002-06-21Change all `preserving ...' diagnostics toJim Meyering
`failed to preserve ...' to make the failure clearer.
2002-06-21Include hurd.h.Jim Meyering
(copy_internal): Preserve the stat.st_author field.
2002-06-21(LOGIN_NAME_MAX): Define if not already defined.Jim Meyering
(ID_LENGTH_MAX): Define. (ST_DM_MODE): New macro. Code moved from... (print_long_format): ...here. (print_long_format): Itemize and comment the individual parts of init_bigbuf. Use the above *_MAX macros.
2002-06-20Change `defined(X)' syntax to `defined X' in cpp directives.Jim Meyering
2002-06-15Include <sys/types.h> before system.h.Jim Meyering
2002-06-15(st_author) [! HAVE_STRUCT_STAT_ST_AUTHOR]: New macro.Jim Meyering
(print_author): New var. (AUTHOR_OPTION): New enum val. (long_options, decode_switches, print_long_format, usage): Support --author. (format_user): New function. (print_long_format): Use it. Make print buffer a bit bigger.
2002-06-15For GNU libc 2.2 and newer, ensure that <sys/types.h>Jim Meyering
has been included before this file.
2002-06-15(S_ISNAM): Add to list of S_IS* macros.Jim Meyering
Rearrange #if directives for each S_IS macro. From diffutils-2.8.2.
2002-06-12(do_move): Give one diagnostic, not two, when unable toJim Meyering
unlink a destination file. This bug was introduced in fileutils-3.16l. $ /bin/mv /etc/passwd /tmp /bin/mv: cannot unlink `/etc/passwd': Permission denied /bin/mv: cannot remove `/etc/passwd': Permission denied [Exit 1]
2002-06-12(rm): Fix typo in assertion.Jim Meyering
2002-06-07(remove_entry): Use DT_IS_DIR only ifJim Meyering
HAVE_STRUCT_DIRENT_D_TYPE is defined.
2002-06-02(enum RM_status) [RM_NONEMPTY_DIR]: New member.Jim Meyering
(UPDATE_STATUS): New macro. Include save-cwd.h. (struct File_spec): Remove declaration. Update prototypes.
2002-06-02(main): Adapt to new calling sequence for rm.Jim Meyering
2002-06-02(do_move): Adapt to new calling sequence for rm.Jim Meyering
2002-06-02Merge in all changes from no-recursion branch.Jim Meyering
* src/remove.c (enum Ternary): Define type. (prompt): Add a parameter. Adjust callers. (remove_entry): Attempt rmdir here, only if a directory is `known' to be empty. Significant rework. (remove_dir): Propagate failure `up' also when rmdir fails. In interactive mode, prompt only once about an empty directory. * src/remove.c (enum Prompt_action): Define. (prompt): Two new parameters. Adjust all callers. Performance. * src/remove.c (remove_entry) [!ROOT_CAN_UNLINK_DIRS]: Don't call rmdir here. * src/remove.c (AD_pop_and_chdir): Don't use errno (it's not valid) in diagnostic for changed dev/ino. (remove_entry): Tweak diagnostic. * src/remove.c (ROOT_CAN_UNLINK_DIRS): Define. (AD_pop_and_chdir): Propagate status as we traverse back `up' the tree. (DO_UNLINK, DO_RMDIR): Define. (remove_entry) [ROOT_CAN_UNLINK_DIRS]: Add code so this works also on systems where root can use `unlink' to remove directories. * src/remove.c: Include file-type.h. Include file type in prompt when asking whether to remove file. Based on a patch from Paul Eggert. * src/remove.c (prompt): Add comment. * src/remove.c (remove_dir): Fix another (known) leak. * src/remove.c (hash_freer): New function. (AD_mark_helper): Use it. (AD_mark_as_unremovable): xstrdup the filename argument. (remove_dir): Free directory name. * src/remove.c (remove_entry): Fail also when trying to remove a directory without the --recursive option. Change a diagnostic, s/unlink/remove/, now that it can apply also to a directory. * src/remove.c (is_empty_dir): New function. (prompt): New function, factored out of... (remove_entry): ...here. Call it. (remove_dir): Call prompt before rmdir. * src/remove.c (remove_entry): Add support for prompting (e.g., -i). * src/remove.h (UPDATE_STATUS): New macro. * src/remove.c [AD_ent] (status): New member. This lets us propagate the status from a subdirectory to its parent via AD_pop_and_chdir. (AD_push_initial): Set it. (AD_push): Likewise. (remove_cwd_entries): Change return type to enum RM_status, and adjust all callers. (rm): Use UPDATE_STATUS rather than open-coding it. * src/remove.c (remove_entry): New function, factored out of... (remove_cwd_entries): ...here, and... (rm_1): ...here. * src/remove.c (remove_cwd_entries): Add support for --verbose. (remove_dir): Likewise. (rm_1): Likewise. * src/remove.c (rm): Free cwd_state, if necessary. * src/remove.c (rm_1): Remove now useless (always true) user_specified_name parameter. Adjust sole caller. * src/remove.c (rm): New function. This interface allows one to remove multiple arguments at a time. This is important in that it allows us to hide the remove_init/remove_fini functions and the cwd_state parameter. (rm_1): Renamed from rm. (remove_init, remove_fini): Remove functions. Each body is now part of `rm'.
2002-06-01Remove use of D_TYPE_IN_DIRENT, now that that symbol has been renamed.Jim Meyering
2002-05-30(copy_reg): Use a temporary to avoid a warningJim Meyering
from gcc -W about comparison between signed and unsigned. (copy_internal): Likewise, but use a cast.
2002-05-25fix typo: s/S_TYPEISTMO/S_TYPEISMQ/Jim Meyering
2002-05-24(validate_path): Compare the result of the function --Jim Meyering
not its (constant) address -- against zero.
2002-05-22(S_ISREG, S_ISDIR): Define if not already defined.Jim Meyering
(S_TYPEISSEM, S_TYPEISSHM, S_TYPEISTMO): Likewise.