num_dirs++;
}
}
- if (gsi->count)
+ if (gsi->count > 0)
gsi->count--;
return 1;
}
}
}
- if (usi->count)
+ if (usi->count > 0)
usi->count--;
return 1;
}
FOR_EACH_USER(ui) {
struct user_stats_info usi = {
- .count = 10,
+ .count = conf.limit_arg,
.ui = ui
};
if (!ui->table)
osl_rbtree_loop_reverse(ui->table, UT_BYTES, &usi,
user_stats_loop_function);
printf("---------- dirs containing most files ------------\n");
- usi.count = 10;
+ usi.count = conf.limit_arg,
usi.flags = USF_PRINT_DIRNAME | USF_PRINT_FILES;
osl_rbtree_loop_reverse(ui->table, UT_FILES, &usi,
user_stats_loop_function);
{
int ret;
struct global_stats_info gsi = {
- .count = 10,
+ .count = conf.limit_arg,
.flags = GSF_PRINT_DIRNAME | GSF_PRINT_BYTES | GSF_COMPUTE_SUMMARY
};
global_stats_loop_function);
if (ret < 0 && ret != -E_LOOP_COMPLETE)
return ret;
- gsi.count = 10;
+ gsi.count = conf.limit_arg;
gsi.flags = GSF_PRINT_DIRNAME | GSF_PRINT_FILES;
printf("---------- dirs containing most files ------------\n");