summaryrefslogtreecommitdiff
path: root/src/du.c
AgeCommit message (Collapse)Author
2007-08-11Accommodate more xstrtol changes.Paul Eggert
* src/df.c (long_options): Don't bother prepending "--" to long options that OPT_STR might decode, as that hack is no longer needed. (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR. * src/du.c (long_options, main): Likewise. * src/ls.c (decode_switches): Likewise. * src/od.c (long_options, main): Likewise. * src/pr.c (first_last_page, main): Likewise. * src/sort.c (long_options, specify_sort_size): Likewise. * src/pr.c (first_last_page): Accept option index and option char instead of an assembled option string. All callers changed. * src/sort.c (specify_sort_size): Likewise. * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT): Remove.
2007-08-04Adapt to new human and xstrtol API.Paul Eggert
* src/df.c (long_options): Prepend "--" to long options that OPT_STR might decode. * src/du.c (long_options): Likewise. * src/od.c (long_options): Likewise. * src/sort.c (long_options): Likewise. * src/df.c (main): Adjust to new human and xstrtol API. * src/du.c (main): Likewise. * src/ls.c (decode_switches): Likewise. * src/od.c (main): Likewise. * src/pr.c (first_last_page): Likewise. New argument OPTION. All callers changed. * src/sort.c (specify_sort_size): New arg OPTION. All callers changed. Adjust to new xstrtol API. * src/system.h (opt_str_storage): New static var. (OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
2007-07-31du: print size (probably incomplete) of each inaccessible directoryJim Meyering
* src/du.c (process_file): Print what we know of the size of a directory even when it is inaccessible. What we print is just the size of the directory itself, not counting any of its contents. * tests/du/inacc-dir: Test for this. * NEWS: Mention this change. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-14Remove long-deprecated options.Jim Meyering
* NEWS: Mention this. * src/df.c, src/ls.c: Remove --kilobytes option. * src/du.c: Remove --kilobytes and --megabytes options. * src/who.c: Remove -i and --idle options. * src/ptx.c: Remove --copyright option. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-05-02* src/du.c (usage): Tweak description of --dereference-args (-D) again.Jim Meyering
Prompted by another request for clarification from Justin Pryzby.
2007-04-25* src/du.c (usage): Clarify description of --dereference-args (-D).Jim Meyering
Prompted by a report from Justin Pryzby.
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2007-02-10* src/csplit.c (usage): Use two spaces (not one) to separateJim Meyering
each option string from its description, so help2man formats the derived man page properly. Reported by Thomas Huriaux in <http://bugs.debian.org/410407>. * src/df.c (usage): Likewise. * src/du.c (usage): Likewise. * src/install.c (usage): Likewise. * src/ls.c (usage): Likewise.
2006-11-27Improve the check for departures from C89, and fix the departuresPaul Eggert
I found. * Makefile.maint (my-distcheck): Also check for C89 compatibility as best we can with GCC. * src/stat.c (PRINTF_OPTION): Omit comma before } in enum declaration; C89 doesn't allow this. * src/dcgen: Don't generate string literals longer than what C89 requires support for. * src/cut.c (usage): Don't use string literals longer than what C89 requires support for. * src/date.c (usage): Likewise. * src/dd.c (usage): Likewise. * src/du.c (usage): Likewise. * src/ls.c (usage): Likewise. * src/od.c (usage): Likewise. * src/readlink.c (usage): Likewise. * src/seq.c (usage): Likewise. * src/shred.c (usage): Likewise.
2006-09-03Don't include dirname.h, since system.h does it now.Paul Eggert
2006-05-20(main): Rename local, s/symlink_deref_bit/symlink_deref_bits/Jim Meyering
and arrange for -D to set fts' FTS_PHYSICAL bit as well as FTS_COMFOLLOW. Spotted by Justin Pryzby.
2006-05-19(main): Don't let -D, -L, or -P turn off the internalJim Meyering
FTS_TIGHT_CYCLE_CHECK directory traversal option. Reported by Justin Pryzby in http://bugs.debian.org/367691
2005-11-04(process_file): Don't overflow for files of size >= 2^31Jim Meyering
on systems with stat.st_blocks of a signed 32-bit type. This bug causes trouble on some AIX 5.1 systems. Report and trivial patch from Paul Townsend: <http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
2005-10-15(usage): Document -m, once again.Jim Meyering
(main): Warn about use of deprecated long options: --kilobytes and --megabytes.
2005-09-16Include fprintftime.h.Jim Meyering
Don't include strftime.h or xanstrftime.h -- no longer needed. (show_date): Use new fprintftime function rather than xanstrftime. Correct comment: this function no longer handles a NULL format string.
2005-09-16Include stat-time.h, and use its functions instead of the obsoletePaul Eggert
TIMESPEC_NS macro.
2005-09-07(time_args): Use NULL in place of 0.Jim Meyering
2005-08-27Go ahead and leave the patch in (i.e., revertJim Meyering
today's change). It doesn't cause a problem after all, since --exclude-from=- is always handled before --files0-from=F.
2005-08-27Revert the du.c part of the change from 2005-07-02:Jim Meyering
That change (to reopen stdin on F for --files0-from=F) made it so --exclude-from=- and --files0-from=F would not work together.
2005-08-21(time_style): Add `const' attribute.Jim Meyering
(tot_dui): Remove unnecessary (and too-short) initializer list.
2005-08-02Include "xanstrftime.h".Jim Meyering
(show_date): Use xanstrftime instead of open-coding it.
2005-07-03(main): Reuse stdin rather than opening a new stream.Paul Eggert
This saves a file descriptor.
2005-06-30Add uses of ARGMATCH_VERIFY to ensure thatJim Meyering
corresponding option string and value arrays are consistent. Remove a harmless trailing `, 0' from a value list.
2005-06-30Add uses of ARGMATCH_VERIFY to ensure thatJim Meyering
corresponding option string and value arrays are consistent. Remove a harmless trailing `, 0' from a value list.
2005-06-29(show_date): Use X2REALLOC rather than x2realloc.Jim Meyering
2005-06-28(show_date): Use x2realloc on 1-byte base types, not x2nrealloc.Jim Meyering
2005-06-23Do not include hard-locale.h.Paul Eggert
(struct duinfo): Remove 'valid' member. All uses changed to use negative nsec instead. (DUIINFO_INI, DUINFO_SET, DUINFO_ADD): Remove. (duinfo_init, duinfo_set, duinfo_add): New functions, taking the role of the removed macros. (opt_time): Renamed from opt_last_time. All uses changed. (TIME_OPTION): Renamed from LAST_TIME_OPTION. All uses changed. (long_options, usage): Rename --last-time to --time. (locale_time_style): Remove. (time_style_args, time_style_types, usage): Remove support for --time-style=locale. (show_date): Now returns void, since nobody looked at the result. Assume FORMAT is not null. An empty FORMAT now outputs an empty time. Simplify nstrftime invocation. (main): Put in ls compatibility workarounds only for TIME_STYLE, not for --time-style. Omit unnecessary space in iso time style.
2005-06-23(time_format): Add `const' attribute.Jim Meyering
2005-06-23(show_date): Add a FIXME comment.Jim Meyering
2005-06-23(show_date): Rename local `time_format' so as not toJim Meyering
shadow the file-scoped global by that name.
2005-06-23(usage): Tweak formatting to maintain more or less constant indentation.Jim Meyering
2005-06-23Include hard-locale.h and strftime.h.Jim Meyering
(DUINFO_INI, DUINFO_SET, DUINFO_ADD): Enclose body in `do {...} while (0)', not just `{...}'. Adjust uses (add semicolons). Adjust formatting, indentation.
2005-06-232005-06-14 William Brendling <wbrendling@gmail.com>Jim Meyering
* src/du.c: Add --last-time and --time-style options.
2005-06-02Don't use "path" or "filename".Paul Eggert
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-01-05(process_file): Evaluate exclusion rules againstJim Meyering
the entire file name, not just the last component.
2004-09-21(main): Remove unused "case 0".Paul Eggert
(long_options): Standardize on NULL vs 0.
2004-08-02(fts_debug, opt_all, apparent_size, opt_count_all,Paul Eggert
print_grand_total, opt_separate_dirs, hash_ins, process_file, main): Use bool for booleans. (max_depth): Now size_t, not int, to avoid an arbitrary limit of INT_MAX on depth. (G_fail): Remove: no longer needed, now that the relevant functions return bool. (process_file): Use return value to signal success rather than setting a global. Remove first_call static var; not needed, since we can look at n_alloc. Use size_t for depths. Remove FIXME about size_t casts, as it's now fixed. Use xnrealloc rather than the obsolescent XREALLOC. Don't bother to check whether reallocation is needed unless level > prev_level. (du_files): Invert sense of result, for consistency with other coreutils code. All callers changed. (main): Allow --max-depth values up to SIZE_MAX.
2004-06-30(usage, main): Output "file system" rather than "filesystem".Jim Meyering
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-04-27(opt_nul_terminate_output): Declare `static'.Jim Meyering
2004-04-27(G_fail): Declare `static'.Jim Meyering
2004-03-28Minor optimization:Jim Meyering
(process_file): Don't record dev/inode for directories. Under some circumstances, without -c, du would mistakenly count the space of hard-linked files, not just the first one it encountered. Reported by Anthony Thyssen. (du_files): Don't ever clear the set of `seen' dev/inodes.
2004-03-27(print_grand_total): Rename global from `print_totals'.Jim Meyering
2004-03-27(main): Rearrange filtering loop to be a tiny bit more efficient.Jim Meyering
2004-03-25(main): Remove now-unused declaration of `i'.Jim Meyering
2004-03-25(main): Filter out file names of length zero beforeJim Meyering
invoking fts, so that they don't cause fatal errors.