summaryrefslogtreecommitdiffstats
path: root/src/luks.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-04-21 14:17:17 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-04-21 14:17:17 +0200
commit3fc3a690fcfe81e1d7d716d5a6e3d2553f5bd747 (patch)
tree7bc8e8729d12086286845b745c3ab30436443eb1 /src/luks.c
parent1533ff643683d351a14a7a863f5513324348cc11 (diff)
LUKS filesystem, list data size unknown only if the partition size is unknown
Diffstat (limited to 'src/luks.c')
-rw-r--r--src/luks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/luks.c b/src/luks.c
index 827598b..f1528f2 100644
--- a/src/luks.c
+++ b/src/luks.c
@@ -59,7 +59,10 @@ int check_LUKS(disk_t *disk_car,partition_t *partition)
static int set_LUKS_info(const struct luks_phdr *sb, partition_t *partition)
{
- sprintf(partition->info,"LUKS %u (Data size unknown)",be16(sb->version));
+ if(partition->part_size > 0)
+ sprintf(partition->info,"LUKS %u", be16(sb->version));
+ else
+ sprintf(partition->info,"LUKS %u (Data size unknown)", be16(sb->version));
return 0;
}