+ao_fat_mbr_cmd(void)
+{
+ uint8_t status;
+
+ status = ao_fat_setup();
+ if (status == AO_FAT_FILESYSTEM_SUCCESS) {
+ printf ("partition type: %02x\n", partition_type);
+ printf ("partition start: %08x\n", partition_start);
+
+ printf ("partition end: %08x\n", partition_end);
+
+ printf ("fat32: %d\n", fat32);
+ printf ("sectors per cluster %d\n", sectors_per_cluster);
+ printf ("reserved sectors %d\n", reserved_sector_count);
+ printf ("number of FATs %d\n", number_fat);
+ printf ("root entries %d\n", root_entries);
+ printf ("sectors per fat %d\n", sectors_per_fat);
+
+ printf ("fat start %d\n", fat_start);
+ printf ("root start %d\n", root_start);
+ printf ("data start %d\n", data_start);
+ } else {
+ printf ("FAT filesystem not available: %s\n", filesystem_errors[status]);
+ }
+}
+
+struct ao_fat_attr {
+ uint8_t bit;
+ char label;
+};
+
+static const struct ao_fat_attr ao_fat_attr[] = {
+ { .bit = AO_FAT_FILE_READ_ONLY, .label = 'R' },
+ { .bit = AO_FAT_FILE_HIDDEN, .label = 'H' },
+ { .bit = AO_FAT_FILE_SYSTEM, .label = 'S' },
+ { .bit = AO_FAT_FILE_VOLUME_LABEL, .label = 'V' },
+ { .bit = AO_FAT_FILE_DIRECTORY, .label = 'D' },
+ { .bit = AO_FAT_FILE_ARCHIVE, .label = 'A' },
+};
+
+#define NUM_FAT_ATTR (sizeof (ao_fat_attr) / sizeof (ao_fat_attr[0]))
+
+static void
+ao_fat_list_cmd(void)