summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2002-04-27(cycle_check): Add a comment.Jim Meyering
2002-04-27(cycle_check): New function containing code factoredJim Meyering
out of remove_dir. The sole difference is that upon detecting a cycle, rm now dies unconditionally. Before, in interactive mode, it would ask the user whether to continue. (remove_dir): Call cycle_check.
2002-04-25(usage): Adjust ordering to match that of default output.Jim Meyering
2002-04-25Avoid warnings from gcc.Jim Meyering
Declare input_file and output_file to be `const'. (skip): Declare `file' parameter to be `const', too.
2002-04-25Remove hash table, active_dir_map, used to detect directory cycles.Jim Meyering
Instead, detect them lazily with just O(1) memory. Suggestion from Andi Kleen. (is_power_of_two): New function. (print_nth_dir, make_active_dir_ent): Remove functions. (hash_active_dir_ent, hash_compare_active_dir_ents): Likewise. (remove_dir): Check for cycles here, ... (rm): ... and don't check for cycles here. (rm): Call fspec_get_full_mode here, rather than fspec_get_filetype_mode. We want to get the dev/ino earlier, and at the same time as when we get the file type, to avoid the risk that an attacker would change e.g. a directory to a symlink before we record its dev/ino.
2002-04-25Revert last change.Jim Meyering
2002-04-25Revert last change.Jim Meyering
2002-04-25Remove ENABLE_NLS-related code.Jim Meyering
(_, N_) Remove definitions. Include "gettext.h" instead.
2002-04-22(rm): Call exit with EXIT_FAILURE, not `1'.Jim Meyering
2002-04-22(main): Adjust caller of remove_init.Jim Meyering
2002-04-22(do_move): Adjust caller of remove_init.Jim Meyering
2002-04-22(remove_init): Adjust prototype.Jim Meyering
2002-04-22(rm, remove_init, remove_fini): Don't use or evenJim Meyering
initialize the active_dir_map unless --recursive (-r) is specified.
2002-04-17(touch): Don't report errors for nonexistent filesJim Meyering
when --no-create is in effect. Based on a patch from TAKAI Kousuke.
2002-04-16(UT_TYPE_UNDEF, UT_TYPE, IS_USER_PROCESS): Define.Jim Meyering
(print_line): Use "%-8.8s" for the format: the user name is not always NUL terminated. (scan_entries) [need_users]: Use IS_USER_PROCESS, so that this works even on systems without ut_type.
2002-04-16(BOOT_TIME): Define.Jim Meyering
(NEW_TIME): Define to 0, not INT_MAX. (UT_PID, UT_ID, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define. Replace literal uses of ut_pid, ut_id, and ut_exit members with uses through macros. (make_id_equals_comment): New function, factored out of three others.
2002-04-16(human_fstype): Rename from print_human_fstype, and rework accordingly.Jim Meyering
(print_statfs): Use human_fstype to honor format width on %T.
2002-04-16Add copyright comment.Jim Meyering
2002-04-15add FIXME commentsJim Meyering
2002-04-15Include xalloc.h.Jim Meyering
Use xmalloc everywhere, not malloc.
2002-04-15Handle "lld" vs "ld" printf formats the same way Bash does.Jim Meyering
Include inttypes.h. (PRIdMAX, PRIuMAX): Define, if not already defined. (print_statfs): Use those macros, not the literal strings. (print_stat): Likewise.
2002-04-15(usage): Give a verbose description of --squeeze-repeats,Jim Meyering
including the mention of SET1.
2002-04-15(print_human_fstype): Add missing `break;' for `case S_MAGIC_MINIX:'.Jim Meyering
2002-04-15remove parens in #if directivesJim Meyering
2002-04-14(statfs_secure): Define.Jim Meyering
(print_stat): Remove another #ifdef. (do_statfs): Likewise. (print_statfs): Prefer/use fputs over printf. (print_stat): Likewise.
2002-04-14filter through GNU indentJim Meyering
2002-04-14Split some long lines.Jim Meyering
(verbose_usage): Remove function.
2002-04-14remove parens in #if directivesJim Meyering
2002-04-14fix TABsJim Meyering
2002-04-14*** empty log message ***Jim Meyering
2002-04-14(verbose_usage): Remove function. Move contents into usage.Jim Meyering
Remove lots of #if directives involving FLASK_LINUX [!FLASK_LINUX] (is_flask_enabled): Define. (stat_secure, lstat_secure): Define. (print_statfs): Remove lots of nested #if directives. Instead, rely on support fo %llu and %lld printf formats -- but that is only temporary, since it's not porable enough. (main): Hoist is_flask_enabled test to be done here, rather than in each of do_stat and do_statfs for every argument.
2002-04-14[HAVE_SYS_VFS_H]: Guard incluion of sys/vfs.h.Jim Meyering
Constify many parameters. (print_statfs): Fix typo: Use %u (to match %lu) for namelen, not %d.
2002-04-13add a couple `const'Jim Meyering
2002-04-13(print_human_fstype): Revamp in a similar fashion. Don't use strdup.Jim Meyering
2002-04-13(print_human_type): Call fputs once rather than calling printf many times.Jim Meyering
Declare most functions to be `static'.
2002-04-13Include system.h, error.h, and many other headers.Jim Meyering
[HAVE_SYS_SYSMACROS_H]: Guard inclusion of sys/sysmacros.h. (PROGRAM_NAME, AUTHORS): Define. (long_options): Declare/define. (print_human_access): Rewrite to use mode_string. (usage): Rewrite. (main): Use getopt_long.
2002-04-13Direct from Debian's stat_3.3-1, modulo trailing blanks (removed)Jim Meyering
and cpp directive (indented via cppi).
2002-04-12Include long-options.h.Jim Meyering
[long_opts]: Remove. (usage): Tweak --help output; use *_OPTION_DESCRIPTION macros. (main): Don't use getopt directly. Use parse_long_options instead. Tweak a diagnostic. Use EXIT_FAILURE rather than a literal `1'. (main): If POSIXLY_CORRECT is set, don't recognize --help or --version, so the program can operate on a file with one of those names.
2002-04-12Include long-options.h.Jim Meyering
[long_opts]: Remove. (usage): Tweak --help output; use *_OPTION_DESCRIPTION macros. (main): Don't use getopt directly. Use parse_long_options instead. Tweak a diagnostic. Use EXIT_FAILURE rather than a literal `1'.
2002-04-12from Debian's fileutils_4.1-10Jim Meyering
2002-03-30(do_move): Correct a comment.Jim Meyering
2002-03-30(forget_created): Prototype.Jim Meyering
2002-03-30(forget_created): New function.Jim Meyering
2002-03-30(copy_internal): Move the block that sets `earlier_file'Jim Meyering
down to just before the first use of that variable. Otherwise, it was possible to make mv (and probably cp, too) malfunction when copying hard-linked files into a directory containing at least one of the source file names. Call forget_created everywhere thereafter where this function returns without creating a destination file that might subsequently be linked. Reported by Iida Yosiaki.
2002-03-25update copyrightJim Meyering
2002-03-25(age_of): Return -1 and 0 rather than 0 and 1.Jim Meyering
Might as well keep it simple, and like bash. (binary_operator): Fix bug with -nt and -ot, when one of the files did not exist. We want to be compatible with the ksh93 documentation, and with Bash.
2002-03-19use only one space after semicolonJim Meyering
2002-03-17(usage): Mention that --format=FORMAT must beJim Meyering
a *floating-point* format, also in description of that option. (usage): Also add the `=' signs here: --format=FORMAT, --separator=STRING.
2002-03-17(copy_internal) [move_mode]: Give a better diagnosticJim Meyering
(using errno from the failed unlink) when a cross-device `mv' fails, e.g., because the destination cannot be unlinked. Prompted by a report from Karl Berry.
2002-03-10(strip): Change wording in diagnostic.Jim Meyering