Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
Commit 588744d0dc
caused grub-mkconfig
no longer to be forgiving of trailing spaces on grub-probe output
lines, which among other things means that util/grub.d/10_linux.in
no longer detects LVM. To fix this, make grub-probe's output
delimiting more consistent. As a bonus, this improves the coverage
of the -0 option.
Fixes Debian bug #735935.
* grub-core/disk/cryptodisk.c
(grub_util_cryptodisk_get_abstraction): Add a user-data argument.
* grub-core/disk/diskfilter.c (grub_diskfilter_get_partmap):
Likewise.
* include/grub/cryptodisk.h (grub_util_cryptodisk_get_abstraction):
Update prototype.
* include/grub/diskfilter.h (grub_diskfilter_get_partmap): Likewise.
* util/grub-install.c (push_partmap_module, push_cryptodisk_module,
probe_mods): Adjust for extra user-data arguments.
* util/grub-probe.c (do_print, probe_partmap, probe_cryptodisk_uuid,
probe_abstraction): Use configured delimiter. Update callers.
This commit is contained in:
parent
9b35fe819f
commit
24024dac7f
7 changed files with 74 additions and 41 deletions
|
@ -387,7 +387,7 @@ probe_raid_level (grub_disk_t disk)
|
|||
}
|
||||
|
||||
static void
|
||||
push_partmap_module (const char *map)
|
||||
push_partmap_module (const char *map, void *data __attribute__ ((unused)))
|
||||
{
|
||||
char buf[50];
|
||||
|
||||
|
@ -401,6 +401,12 @@ push_partmap_module (const char *map)
|
|||
grub_install_push_module (buf);
|
||||
}
|
||||
|
||||
static void
|
||||
push_cryptodisk_module (const char *mod, void *data __attribute__ ((unused)))
|
||||
{
|
||||
grub_install_push_module (mod);
|
||||
}
|
||||
|
||||
static void
|
||||
probe_mods (grub_disk_t disk)
|
||||
{
|
||||
|
@ -412,11 +418,11 @@ probe_mods (grub_disk_t disk)
|
|||
grub_util_info ("no partition map found for %s", disk->name);
|
||||
|
||||
for (part = disk->partition; part; part = part->parent)
|
||||
push_partmap_module (part->partmap->name);
|
||||
push_partmap_module (part->partmap->name, NULL);
|
||||
|
||||
if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID)
|
||||
{
|
||||
grub_diskfilter_get_partmap (disk, push_partmap_module);
|
||||
grub_diskfilter_get_partmap (disk, push_partmap_module, NULL);
|
||||
have_abstractions = 1;
|
||||
}
|
||||
|
||||
|
@ -432,7 +438,7 @@ probe_mods (grub_disk_t disk)
|
|||
if (disk->dev->id == GRUB_DISK_DEVICE_CRYPTODISK_ID)
|
||||
{
|
||||
grub_util_cryptodisk_get_abstraction (disk,
|
||||
grub_install_push_module);
|
||||
push_cryptodisk_module, NULL);
|
||||
have_abstractions = 1;
|
||||
have_cryptodisk = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue