summaryrefslogtreecommitdiffstats
path: root/src/luks.c
diff options
context:
space:
mode:
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;
}