/* Routine implementing u-boot fsinfo command. This routine prints out miscellaneous filesystem informations/statistics. */
int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* Routine implementing u-boot fsinfo command. This routine prints out miscellaneous filesystem informations/statistics. */
int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	struct part_info *part;
	char *fsname;
	int ret;
	if (mtdparts_init() !=0)
		return 1;
	if ((part = jffs2_part_info(current_mtd_dev, current_mtd_partnum))){
		fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
		printf("### filesystem type is %s\n", fsname);
		if (cramfs_check(part)) {
			ret = cramfs_info (part);
		} else {
			ret = jffs2_1pass_info(part);
		}
		return ret ? 0 : 1;
	}
	return 1;
}