basic function for dump_ext2()