summaryrefslogtreecommitdiffstats
path: root/src/fat.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-04-21 14:14:54 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-04-21 14:14:54 +0200
commitcfce3a37ce2a73b6c2bca3c770918f76010710d4 (patch)
tree9ae9716b0c00c607b6b901f534befaad21d6950c /src/fat.c
parent86319057d27d7e2a90da5e56178e7824455413ec (diff)
Add blocksize in filesystem description
Diffstat (limited to 'src/fat.c')
-rw-r--r--src/fat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fat.c b/src/fat.c
index 5c045a7..8181f0f 100644
--- a/src/fat.c
+++ b/src/fat.c
@@ -198,10 +198,11 @@ static int set_FAT_info(disk_t *disk_car, const struct fat_boot_sector *fat_head
{
const char*buffer=(const char*)fat_header;
partition->fsname[0]='\0';
+ partition->blocksize=fat_sector_size(fat_header)* fat_header->sectors_per_cluster;
switch(partition->upart_type)
{
case UP_FAT12:
- snprintf(partition->info,sizeof(partition->info),"FAT12");
+ snprintf(partition->info, sizeof(partition->info), "FAT12, blocksize=%u", partition->blocksize);
if(buffer[38]==0x29) /* BS_BootSig */
{
set_part_name_chomp(partition,((const unsigned char*)fat_header)+FAT1X_PART_NAME,11);
@@ -210,7 +211,7 @@ static int set_FAT_info(disk_t *disk_car, const struct fat_boot_sector *fat_head
}
break;
case UP_FAT16:
- snprintf(partition->info,sizeof(partition->info),"FAT16");
+ snprintf(partition->info, sizeof(partition->info), "FAT16, blocksize=%u", partition->blocksize);
if(buffer[38]==0x29) /* BS_BootSig */
{
set_part_name_chomp(partition,((const unsigned char*)fat_header)+FAT1X_PART_NAME,11);
@@ -219,7 +220,7 @@ static int set_FAT_info(disk_t *disk_car, const struct fat_boot_sector *fat_head
}
break;
case UP_FAT32:
- snprintf(partition->info,sizeof(partition->info),"FAT32");
+ snprintf(partition->info, sizeof(partition->info), "FAT32, blocksize=%u", partition->blocksize);
fat32_set_part_name(disk_car,partition,fat_header);
break;
default: