Re: du suggestion
Richard Dawe <[email protected]> Sun, 20 Jun 2004 13:23:56 +0100
| Newsgroups | gmane.comp.gnu.fileutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hello. Tim Newsham wrote: > Would be nice if DU could print out the cost of the storage rather > than the number of blocks. The following code shows an example > of this (option -$ reads a cost from /usr/share/du-cost and applies > it before printout out the result). Haha. Nice idea. I can think of a couple of problems with the patch: * It doesn't distinguish between IDE and SCSI disks, not to mention other forms of storage (e.g.: NAS mounted over NFS). So it ignores the real cost of the storage, which isn't just a simple bucks per Meg. * I think it should read from something like /usr/share/<package>/du-cost rather than /usr/share, where <package> is coreutils-5.2.1 or similar. (fileutils is now part of coreutils, along with sh-utils and textutils). * It doesn't support internationalisation. Where is its support for the Euro, the Yen, the Yuan, Norweigan Kroner, etc.? Perhaps you could use xe.com, to do the currency conversion on-the-fly? > --- du.c.orig Fri Jun 18 15:51:04 2004 > +++ du.c Fri Jun 18 16:09:07 2004 [snip] > @@ -758,6 +775,26 @@ > default: > usage (1); > } > + } > + > + /* > + * ick! look at these indents! placement of braces and > + * spaces around parenthesis! Who wrote this, the french!? > + * oh well, I will try to abide by their horrible style rules. > + */ [snip] It's the GNU Coding Style, I suspect. Incidentally, I'm one-eighth French and I find that comment incredibly offensive. The other seven-eighths of me doesn't care, but suggests that this comment isn't really appropriate. 8) Bye, Rich =] -- Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ] "You can't evaluate a man by logic alone." -- McCoy, "I, Mudd", Star Trek