From 3fc3a690fcfe81e1d7d716d5a6e3d2553f5bd747 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 21 Apr 2012 14:17:17 +0200 Subject: [PATCH] LUKS filesystem, list data size unknown only if the partition size is unknown --- src/luks.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/luks.c b/src/luks.c index 827598b5..f1528f2c 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; }