summaryrefslogtreecommitdiffstats
path: root/src/btrfs.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/btrfs.c
parent86319057d27d7e2a90da5e56178e7824455413ec (diff)
Add blocksize in filesystem description
Diffstat (limited to 'src/btrfs.c')
-rw-r--r--src/btrfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/btrfs.c b/src/btrfs.c
index 911f0c0..9585b24 100644
--- a/src/btrfs.c
+++ b/src/btrfs.c
@@ -41,8 +41,9 @@ static int test_btrfs(const struct btrfs_super_block *sb, partition_t *partition
static int set_btrfs_info(const struct btrfs_super_block *sb, partition_t *partition)
{
+ partition->blocksize=le32(sb->dev_item.sector_size);
set_part_name(partition, sb->label, sizeof(partition->partname));
- strncpy(partition->info,"btrfs",sizeof(partition->info));
+ snprintf(partition->info, sizeof(partition->info), "btrfs blocksize=%u", partition->blocksize);
if(le64(sb->bytenr)!=partition->part_offset + BTRFS_SUPER_INFO_OFFSET)
{
strcat(partition->info," Backup superblock");
@@ -94,7 +95,6 @@ int recover_btrfs(disk_t *disk, const struct btrfs_super_block *sb, partition_t
partition->part_type_sun=PSUN_LINUX;
partition->part_type_gpt=GPT_ENT_TYPE_LINUX_DATA;
partition->part_size=(uint64_t)le64(sb->dev_item.total_bytes);
- partition->blocksize=le32(sb->dev_item.sector_size);
guid_cpy(&partition->part_uuid, (const efi_guid_t *)&sb->fsid);
if(verbose>0)
{