- - work out what to do about atimes on directories in the absence of
- the Linux syscall magic
- * one option is to read them during the scan and reinstate them
- after each recursion pop. Race-condition prone.
- * marking them in a distinctive colour in the reports is another
- option.
- * a third option is simply to ignore space taken up by
- directories in the first place; inaccurate but terribly simple.
- * incidentally, sometimes open(...,O_NOATIME) will fail, and
- then we have to fall back to ordinary open. Be prepared to do
- this, which probably means getting rid of the icky macro
- hackery in du.c and turning it into a more sensible run-time
- abstraction layer.
-
- - polish the plain-text output to make it look more like du
- + configurable recursive output depth
- + show the right bits last
-
- - figure out what to do about scans starting in the root directory
- + Currently we end up with a double leading slash on the
- pathnames, which is ugly, and we also get a zero-length href
- in between those slashes which means the web interface doesn't
- let you click back up to the top level at all.
- + One big problem here is that a lot of the code assumes that
- you can find the extent of a pathname by searching for "foo"
- and "foo^A", trusting that anything inside the directory will
- begin "foo/". So I'd need to consistently fix this everywhere
- so that a trailing slash is disregarded while doing it, but
- not actually removed.
- + The text output gets it all wrong.
- + The HTML output is fiddly even at the design stage: where
- would I _ideally_ put the link to click on to get back to /?
- It's unclear!
-
- - cross-Unix portability:
- + use autoconf
- * configure use of stat64
- * configure use of /proc/net/tcp
- * configure use of /dev/random
- * configure use of Linux syscall magic replacing readdir
- + later glibcs have fdopendir, hooray! So we can use that
- too, if it's available and O_NOATIME is too.
- * what do we do elsewhere about _GNU_SOURCE?
-
- - man page, licence.
-
-Future directions:
+ - we could still be using more of the information coming from
+ autoconf. Our config.h is defining a whole bunch of HAVE_FOOs for
+ particular functions (e.g. HAVE_INET_NTOA, HAVE_MEMCHR,
+ HAVE_FNMATCH). We could usefully supply alternatives for some of
+ these functions (e.g. cannibalise the PuTTY wildcard matcher for
+ use in the absence of fnmatch, switch to vanilla truncate() in
+ the absence of ftruncate); where we don't have alternative code,
+ it would perhaps be polite to throw an error at configure time
+ rather than allowing the subsequent build to fail.
+ + however, I don't see anything here that looks very
+ controversial; IIRC it's all in POSIX, for one thing. So more
+ likely this should simply wait until somebody complains.