aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/du.c
AgeCommit message (Collapse)Author
2018-08-31Convert option style.Rob Landley
2018-03-19Ryan Prichard pointed out that du -d0 should act like du -s, but the plumbingRob Landley
wouldn't let him assign a negative default value, so I fixed it.
2017-05-27Replace two space indents with tab indents in help text (for consistency).Rob Landley
2016-10-01du: 32 bit systems were maxing out at 2GB when they should max out at 2TBRob Landley
(1<<32 blocks * 512 bytes, done with unsigned 64 bit math).
2016-03-07Cleanup pass on the dirtree infrastructure, in preparation for making rm -rRob Landley
handle infinite depth. Fix docs, tweak dirtree_handle_callback() semantics, remove dirtree_start() and don't export dirtree_handle_callback(), instead offer dirtree_flagread(). (dirtree_read() is a wrapper around dirtree_flagread passing 0 for flags.)
2015-08-08Different tools have different ideas about what human-readable outputElliott Hughes
looks like. dd uses "7 MB" where du uses "7M", for example. this patch adds flags, similar to the BSD humanize_number. most callers will pass 0.
2015-05-31Move the magic list of commands needing cleanup from toys/pending/READMERob Landley
to greppable TODO annotations in the individual files. (grep -riw TODO)
2015-05-10Cleanups of dirtree_start() calls. (Don't need to feed in flag values, justRob Landley
symfollow true/false.)
2015-05-09Add DIRTREE_SHUTUP to disable dirtree warnings if file vanishes out fromRob Landley
under traversal. Pass through full flag set in dirtree_add_node(), add dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
2014-12-01Ashwini Sharma pointed out that "mkdir sub; ln -s . sub/up; du -L sub" ↵Rob Landley
shouldn't loop endlessly.
2014-07-26Move DIRTREE_COMEAGAIN second callback up to when the filehandle is still ↵Rob Landley
open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle.
2014-05-06Switch human_readable() to just outputing decimal kilo/mega/gigabytes, make ↵Rob Landley
du use it, move it from lib/pending.c to lib.c.
2014-04-16Revert lots of half-finished local debris I didn't mean to check in with ↵Rob Landley
Isaac's roadmap update. Mercurial's "import" command is still broken, committing local tree changes to files that weren't even touched by the patch because the hg developers inisist, when I point out how stupid it is, that they meant to do that. (hg record can do hunks, but import can't even track _files_.)
2014-04-12roadmap: describe glibc commands.Isaac Dunham
Some glibc commands are irrelevant because they're for functionality that is excluded from musl (mtrace, rpc*, localedef, iconvconfig, nscd). getconf and catchsegv look like candidates for the development toolchain; locale and iconv were already triaged. getent is pretty lame, but it and the timezone stuff (tzselect zic zdump) are the only new possibly interesting commands.
2013-08-18Fix wrong printf type.Rob Landley
2013-08-18Cleanup du.Rob Landley
2012-12-31Make dirtree_handle_callback() start with dirtree_ like the rest of the ↵Rob Landley
dirtree functions.
2012-12-06Have dirtree_add_node() set parent so error message can provide full path.Rob Landley
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring.
2012-10-08New build infrastructure to generate FLAG_ macros and TT alias, #define ↵Rob Landley
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
2012-08-26Add du command.Ashwini Kumar