On 07/26/2013 03:45 PM, Bernhard Voelker wrote:

> +@itemx --inodes
> +@opindex --inodes
> +@cindex inode usage, dereferencing in @command{du}
> +List inode usage information instead of block usage.  An inode (short
> +for index node) contains information about a file such as its owner,
> +permissions, timestamps, and location on the disk.

The above is a bit detailed and may be inaccurate for some (pseudo) file 
systems.
I'd tend to not define inode at all here, but if you prefer I'd just say
something generic like that "an inode is used to identify file system objects".

> diff --git a/src/du.c b/src/du.c
> index a6fa16b..d22ca73 100644
> --- a/src/du.c
> +++ b/src/du.c
> @@ -78,6 +78,9 @@ struct duinfo
>    /* Size of files in directory.  */
>    uintmax_t size;
>  
> +  /* Number of inodes in directory.  */
> +  size_t inodes;
> +

uintmax_t (as returned by fsusage)

> +      intmax_t v = opt_inodes ? dui_to_print.inodes : dui_to_print.size;

uintmax_t as the threshold is limited to intmax_t, but size is not.


> diff --git a/tests/du/inodes.sh b/tests/du/inodes.sh

> +. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
> +print_ver_ du ln mkdir printf rm seq touch

The main util under test is fine to print here

You're free to push with those adjustments.

thanks!
Pádraig.

Reply via email to