summaryrefslogtreecommitdiff
path: root/src/du.c
AgeCommit message (Collapse)Author
2003-03-05(process_file): Sizes must all be of type uintmax_t.Jim Meyering
Otherwise, for files or totals that are too big, numbers would be truncated. Patch mostly by Michael Stone.
2003-03-04(MAX_N_DESCRIPTORS): Use 3 * UTILS_OPEN_MAX / 4.Jim Meyering
2003-02-21New option: --apparent-size.Jim Meyering
(enum) [APPARENT_SIZE_OPTION]: New member. (long_options): Add it. (usage): Describe it. (main): Handle it. ['b']: Set apparent_size.
2003-02-21(apparent_size): New global.Jim Meyering
(print_only_size): Reflect the fact that we're printing byte counts, not ST_NBLOCKSIZE-byte-block counts. (print_size): Call print_only_size rather than duplicating its code. (process_file): Accumulate byte counts, rather than block counts.
2003-02-21(process_file): Always reset size_to_propagate_to_parent forJim Meyering
--separate-dirs (-S).
2003-02-20(process_file): Reorganize the code to use onlyJim Meyering
one `sum' array, and change how -S works back to the way it was before 2003-01-31. Patch by Bruno Haible.
2003-02-20(process_file): Set info->skip before any possible return.Jim Meyering
Report correct usage for directories, not 0. (process_file): Return for `file_type == FTW_DPRE' _before_ recording the dev/ino of a directory.
2003-02-19Include "mmap-stack.h".Jim Meyering
(du_files): Add prototype with ATTRIBUTE_NORETURN. Exit from this function, not from... (main): ...here. Instead, if possible, invoke du_files through a macro that runs it with a large, mmap'd stack.
2003-02-06(process_file): Don't return early for excluded filesJim Meyering
or for files whose dev/inode we've already seen.
2003-02-01Don't put decl after non-decl.Jim Meyering
2003-02-01(MAX_N_DESCRIPTORS): Define.Jim Meyering
2003-01-31ditto for invalid optionsJim Meyering
2003-01-31(main): Upon processing a bad --exclude-from or --max-depthJim Meyering
option argument, don't exit right away, in case there are others. Rather record the failure and exit after processing other options.
2003-01-31Rewrite to perform directory traversal using nftw.Jim Meyering
Include "dirname.h", "ftw.h", and "quotearg.h". (AUTHORS): Add self. (opt_one_file_system): Move global into `main'. (path, xstat, exit_status): Remove declarations. (arg_length, suffix_length): New globals. (G_fail): New global, sort of like the old `exit_status'. (IS_FTW_DIR_TYPE): Define. (print_only_size): New function. (process_file): New function. (str_init, ensure_space, str_copyc, str_concatc): Remove functions. (str_trunc, pop_dir, count_entry): Likewise. (du_files): Rewrite to use nftw.
2003-01-04remove blank lineJim Meyering
2003-01-04(count_entry) [S_ISLNK]: Don't define.Jim Meyering
It's already defined in sys2.h.
2002-12-08(lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]:Jim Meyering
Define to rpl_lstat, so that even on systems like Solaris 5.8, du honors (per POSIX) the trailing slash on an argument referring to a symlink-to-directory.
2002-11-24More clean-up, not that / means /.Jim Meyering
2002-11-24(du_files): Don't strip any trailing slash.Jim Meyering
Rewrite so that `/' is no longer represented internally as the empty string. (count_entry): When appending a file name component, account for the fact that the current path may end in `/'. François Pinard reported that `du symlink-to-dir/' was not equivalent to `du symlink-to-dir/.'. Now it is.
2002-11-08(human_output_opts): New var.Jim Meyering
(output_block_size): Now uintmax_t, not int, to handle larger block sizes. All uses changed.
2002-10-13(usage): Tweak description of --dereference-args/-D.Jim Meyering
2002-10-13(count_entry): Also save cwd when dereferencing (via --dereference-args, -D)Jim Meyering
a command-line argument. Reported by Michal Svec. Based on a patch by Andreas Schwab.
2002-10-03Mark translatable string with `N_ (...)'.Jim Meyering
2002-09-22Remove all inclusions of inttypes.h,Jim Meyering
since it's already included from sys2.h via system.h.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-07-10update copyrightJim Meyering
2002-07-10(usage) [--exclude]: Use PATTERN rather than PAT.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2001-12-21(BLOCK_SIZE_OPTION): Remove; no longer needed now that we have 'B'.Jim Meyering
(long_options, usage, main): Add -B. (usage): Deprecate --kilobytes, -m, --megabytes. Document size suffixes.
2001-12-02Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23(usage): Note that ``Mandatory arguments to long options are mandatoryJim Meyering
for short options too.''
2001-11-23(usage): Split --help output into smaller pieces.Jim Meyering
Use fputs, not printf.
2001-11-23Use opaque type, Hash_table, not `struct hash_table'.Jim Meyering
2001-10-06Convert du.c to use the functions in lib/hash.c, not private,Jim Meyering
slightly-modified copies of those that used to be in cp-hash.c. (struct entry) [coll_link]: Remove member. (struct htab): Remove. (hash_reset, hash_init, hash_insert2, hash_insert): Remove functions. Include hash.h and same.h. (htab): Change type of global to `struct hash'; (entry_hash, entry_compare, hash_ins): New functions. (count_entry): Use hash_ins instead of hash_insert.
2001-08-31(count_entry): Remove st_size argument.Jim Meyering
2001-08-31copyrightJim Meyering
2001-08-31(count_entry, main): Reflect changes to the exclude functions.Jim Meyering
2000-11-18(count_entry): Don't omit the size of a directory entryJim Meyering
merely because we couldn't `chdir' into it. That would give subtly different results in some cases. Reported by Mattias Wadenstein via Michael Stone.
2000-08-20(print_totals): Rename global from opt_combined_arguments.Jim Meyering
2000-08-15(count_entry): Remember the current directory also for `.'Jim Meyering
and `..'. Reported by Stephen Smoogen, based on a patch from H.J. Lu.
2000-07-30Convert "`%s'" in format strings to "%s", and wrap eachJim Meyering
corresponding argument in a `quote (...)' call.
2000-06-27(count_entry): Don't set errno beforeJim Meyering
invoking savedir, and assume that errno is nonzero if savedir fails.
2000-06-16(print_size): Round disk usage up.Jim Meyering
2000-05-13Arrange to call close_stdout only upon exit.Jim Meyering
2000-04-27(pop_dir): Remove through_symlink arg; use null cwdJim Meyering
for that purpose instead. (count_entry): Also save the directory if we're saving more than one level. Fix file descriptor and memory leak when chdir fails.
2000-02-15(pop_dir): New function.Jim Meyering
(count_entry): Factor out common code (pop_dir), and call the new function instead. Move declaration of global, `stat_buf' into this function. (du_files): Don't stat `.' or call save_cwd, since count_entry never returns with a changed working directory.
2000-01-12(count_entry): Adjust to new calling convention for excluded_filename.Jim Meyering
(main): Likewise, for add_exclude_file.
1999-12-09(BLOCK_SIZE_OPTION, EXCLUDE_OPTION, MAX_DEPTH_OPTION):Jim Meyering
Define these and use them instead of `CHAR_MAX + n'.
1999-08-08(count_entry): Remove cast of savedir arg.Jim Meyering