Age | Commit message (Collapse) | Author |
|
and arrange for -D to set fts' FTS_PHYSICAL bit as well as
FTS_COMFOLLOW. Spotted by Justin Pryzby.
|
|
FTS_TIGHT_CYCLE_CHECK directory traversal option.
Reported by Justin Pryzby in http://bugs.debian.org/367691
|
|
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>
|
|
(main): Warn about use of deprecated long options: --kilobytes and --megabytes.
|
|
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.
|
|
TIMESPEC_NS macro.
|
|
|
|
today's change). It doesn't cause a problem after all, since
--exclude-from=- is always handled before --files0-from=F.
|
|
That change (to reopen stdin on F for --files0-from=F) made it so
--exclude-from=- and --files0-from=F would not work together.
|
|
(tot_dui): Remove unnecessary (and too-short) initializer list.
|
|
(show_date): Use xanstrftime instead of open-coding it.
|
|
This saves a file descriptor.
|
|
corresponding option string and value arrays are consistent.
Remove a harmless trailing `, 0' from a value list.
|
|
corresponding option string and value arrays are consistent.
Remove a harmless trailing `, 0' from a value list.
|
|
|
|
|
|
(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.
|
|
|
|
|
|
shadow the file-scoped global by that name.
|
|
|
|
(DUINFO_INI, DUINFO_SET, DUINFO_ADD):
Enclose body in `do {...} while (0)', not just `{...}'.
Adjust uses (add semicolons).
Adjust formatting, indentation.
|
|
* src/du.c: Add --last-time and --time-style options.
|
|
|
|
|
|
|
|
the entire file name, not just the last component.
|
|
(long_options): Standardize on NULL vs 0.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
(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.
|
|
|
|
|
|
|
|
invoking fts, so that they don't cause fatal errors.
|
|
Remove: not used.
(usage): Say "NUL-terminated", not "NUL-separated".
(main): Check for I/O error when istream is closed.
Allow --files0-from=F even if F is empty; this specifies no files.
(du_files): Now that we allow the list of files to be empty,
handle that case.
|
|
|
|
(main): Call readtokens0_free.
|
|
(main): Use readtoken0 functions rather than readtokens.
Don't use errno when diagnosing readtokens0 failure.
|
|
_("no files specified in %s"),
|
|
a list of NUL-separated file names.
Include "readtokens.h".
(usage): Describe the new option, and adjust the `Usage':
with this option, no FILE may be specified on the command line.
(main): Handle the new option.
|
|
of -H will soon change to that of --dereference-args (-D).
|
|
|
|
|
|
output line is NUL-terminated rather than newline-terminated.
|
|
(main): Make fts use FTS_TIGHT_CYCLE_CHECK.
(main) [DU_DEBUG]: Accept -d option.
|
|
type changes (unsigned int -> size_t) in hash.c.
|