PRINT_DEVICE,
PRINT_PARTMAP,
PRINT_ABSTRACTION,
+ PRINT_LUKS_UUID
};
int print = PRINT_FS;
}
}
+static void
+probe_luks_uuid (grub_disk_t disk)
+{
+ grub_disk_memberlist_t list = NULL, tmp;
+
+ /* In case of LVM/RAID, check the member devices as well. */
+ if (disk->dev->memberlist)
+ {
+ list = disk->dev->memberlist (disk);
+ }
+ while (list)
+ {
+ probe_luks_uuid (list->disk);
+ tmp = list->next;
+ free (list);
+ list = tmp;
+ }
+ if (disk->dev->id == GRUB_DISK_DEVICE_LUKS_ID)
+ grub_util_luks_print_uuid (disk);
+}
+
static int
probe_raid_level (grub_disk_t disk)
{
goto end;
}
+ if (print == PRINT_LUKS_UUID)
+ {
+ probe_luks_uuid (dev->disk);
+ printf ("\n");
+ goto end;
+ }
+
if (print == PRINT_PARTMAP)
{
/* Check if dev->disk itself is contained in a partmap. */
\n\
-d, --device given argument is a system device, not a path\n\
-m, --device-map=FILE use FILE as the device map [default=%s]\n\
- -t, --target=(fs|fs_uuid|fs_label|drive|device|partmap|abstraction)\n\
- print filesystem module, GRUB drive, system device, partition map module or abstraction module [default=fs]\n\
+ -t, --target=(fs|fs_uuid|fs_label|drive|device|partmap|abstraction|luks_uuid)\n\
+ print filesystem module, GRUB drive, system device, partition map module, abstraction module or LUKS UUID [default=fs]\n\
-h, --help display this message and exit\n\
-V, --version print version information and exit\n\
-v, --verbose print verbose messages\n\
print = PRINT_PARTMAP;
else if (!strcmp (optarg, "abstraction"))
print = PRINT_ABSTRACTION;
+ else if (!strcmp (optarg, "luks_uuid"))
+ print = PRINT_LUKS_UUID;
else
usage (1);
break;