Re: [Toybox] What does the du.c patch do?

2014-12-01 Thread Ashwini Sharma
Hi Rob, My patch was +// is recursive tree +static int is_recursive_loop(struct dirtree *node) +{ + struct dirtree *tmp = node; + + while ((tmp = tmp-parent)) { +if ((tmp-st.st_ino == node-st.st_ino) +(tmp-st.st_dev == node-st.st_dev)) + return 1; + } + return 0; +} + //

Re: [Toybox] What does the du.c patch do?

2014-12-01 Thread Rob Landley
On 12/01/14 05:40, Ashwini Sharma wrote: Hi Rob, ... $ du -L sub without my patch it will keep looping. This patch stops from this looping. Thanks, Ashwini Ah, you're fixing the -L case. (I'd mentally written that off as pilot error, but I see Ubuntu's du implementation doesn't loop.)

[Toybox] What does the du.c patch do?

2014-11-29 Thread Rob Landley
Going through Ashwini's patch stack from last month. (Sorry for the delay, but I think I applied all the trivial ones in earlier passes.) What does the du.c patch do? $ mkdir sub $ ln -s . sub/here $ ln -s loop sub/loop $ ./toybox du sub 4 sub There's also a hardlink filter