summaryrefslogtreecommitdiffstats
path: root/src/xfs.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-08-12 20:30:38 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-08-12 20:30:38 +0200
commita1a86ea8e96e799c8e0c74e5fcddd97975b7190c (patch)
tree3ab23b26b62cf0ebf6ff9b51f00d51b9d64a585b /src/xfs.c
parent52b71fc9c277a4609f328d687f4096f276bbc42c (diff)
Return blocksize for XFS filesystem
Diffstat (limited to 'src/xfs.c')
-rw-r--r--src/xfs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/xfs.c b/src/xfs.c
index 086eff1..7bb61e6 100644
--- a/src/xfs.c
+++ b/src/xfs.c
@@ -112,21 +112,26 @@ int recover_xfs(disk_t *disk_car, const struct xfs_sb *sb,partition_t *partition
static int set_xfs_info(const struct xfs_sb *sb, partition_t *partition)
{
+ partition->blocksize=be32(sb->sb_blocksize);
partition->fsname[0]='\0';
partition->info[0]='\0';
switch(partition->upart_type)
{
case UP_XFS:
- strncpy(partition->info,"XFS <=6.1",sizeof(partition->info));
+ snprintf(partition->info, sizeof(partition->info),
+ "XFS <=6.1 blocksize=%u", partition->blocksize);
break;
case UP_XFS2:
- strncpy(partition->info,"XFS 6.2 - attributes",sizeof(partition->info));
+ snprintf(partition->info, sizeof(partition->info),
+ "XFS 6.2 - attributes blocksize=%u", partition->blocksize);
break;
case UP_XFS3:
- strncpy(partition->info,"XFS 6.2 - new inode version",sizeof(partition->info));
+ snprintf(partition->info, sizeof(partition->info),
+ "XFS 6.2 - new inode version blocksize=%u", partition->blocksize);
break;
case UP_XFS4:
- strncpy(partition->info,"XFS 6.2+ - bitmap version",sizeof(partition->info));
+ snprintf(partition->info, sizeof(partition->info),
+ "XFS 6.2+ - bitmap version blocksize=%u", partition->blocksize);
break;
default:
return 1;