of directories on a filesystem --- because we can and
because it can be useful.
+2002-07-15 Theodore Ts'o <tytso@mit.edu>
+
+ * debugfs.c (do_show_super_stats): Calculate and print the number
+ of directories on a filesystem --- because we can and
+ because it can be useful.
+
2002-07-09 Theodore Ts'o <tytso@mit.edu>
* debugfs.c (do_rmdir), debugfs.8.in: Implement the rmdir command.
FILE *out;
struct ext2_group_desc *gdp;
int c, header_only = 0;
+ int numdirs = 0;
const char *usage = "Usage: show_super [-h]";
optind = 0;
out = open_pager();
list_super2(current_fs->super, out);
-
+ for (i=0; i < current_fs->group_desc_count; i++)
+ numdirs += current_fs->group_desc[i].bg_used_dirs_count;
+ fprintf(out, "Directories: %d\n", numdirs);
+
if (header_only) {
close_pager(out);
return;