diff --git a/ChangeLog b/ChangeLog index e5220788d..8d7d988b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-12-10 Vladimir Serbinenko + + * grub-core/disk/cryptodisk.c (grub_cmd_cryptomount): Strip brackets + around device name if necessarry. + 2012-12-10 Paulo Flabiano Smorigo * util/grub-install.in: Follow the symbolic link parameter added diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c index 1ac906d90..3de3b8668 100644 --- a/grub-core/disk/cryptodisk.c +++ b/grub-core/disk/cryptodisk.c @@ -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;