* grub-core/disk/cryptodisk.c (grub_cmd_cryptomount): Strip brackets

around device name if necessarry.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-12-10 19:15:51 +01:00
parent 0f596201dc
commit ce96d01c93
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/cryptodisk.c (grub_cmd_cryptomount): Strip brackets
around device name if necessarry.
2012-12-10 Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
* util/grub-install.in: Follow the symbolic link parameter added

View file

@ -928,10 +928,20 @@ grub_cmd_cryptomount (grub_extcmd_context_t ctxt, int argc, char **args)
grub_err_t err;
grub_disk_t disk;
grub_cryptodisk_t dev;
char *devname;
char *devlast;
search_uuid = NULL;
check_boot = state[2].set;
disk = grub_disk_open (args[0]);
devname = args[0];
if (devname[0] == '(' && *(devlast = &devname[grub_strlen (devname) - 1]) == ')')
{
*devlast = '\0';
disk = grub_disk_open (devname + 1);
*devlast = ')';
}
else
disk = grub_disk_open (devname);
if (!disk)
return grub_errno;