Re: [dev] [sbase] [patch] Add primitive du(1)

From: sin <sin_AT_2f30.org>
Date: Wed, 16 Oct 2013 20:10:43 +0300

On Wed, Oct 16, 2013 at 06:47:26PM +0200, Truls Becken wrote:
> A few trivial comments:
>
> Moving main() to the bottom and usage() to the top would eliminate the
> need to declare them.

Sure.

> Functions push() and pop() seem to only be used once each.
> Would it be too bad to have these few lines directly in the du function?

Yeah I can put it directly into the du function.

> The switch in du would be slightly simpler as an if statement I think.

Already fixed locally.

> Why not use eprintf for the opendir error?

Apparently if you do sth like:

  % mkdir foo
  % chmod 0 foo
  % du foo
  du: cannot read directory `foo': Permission denied
  4 foo

So processing continues.

Thanks,
sin
Received on Wed Oct 16 2013 - 19:10:43 CEST

This archive was generated by hypermail 2.3.0 : Wed Oct 16 2013 - 19:12:19 CEST