From 92e9352ded7f5d2d9c3a36f28522f2131178c415 Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Sat, 7 Dec 2013 18:58:19 +0400 Subject: [PATCH] second attempt to fix using grub device name as install device grub-install already resolved passed install device to grub device. So do the same as grub-setup and strip parenthesis if we get legacy (hdX). I accidentally commited revert of 69ca97c820a623f85baf2db1627e19bef9c24e44 and this patch as part of f585c905054b8c74e6e0a67341e84accfb816912. So this commit just adds ChangeLog entry and cosmetic whitespace fix. --- ChangeLog | 6 ++++++ util/grub-install.c | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8d650572a..d7b982294 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-12-07 Andrey Borzenkov + + Revert commit 69ca97c820, it caused failures when using OS device name + in grub-install. Instead just strip off parenthesis in grub-install + if (hdX) was passed. + 2013-12-07 Andrey Borzenkov * util/grub-install.c (push_partmap_module): Add helper to convert diff --git a/util/grub-install.c b/util/grub-install.c index 4cc557eea..7596ad91e 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1104,7 +1104,6 @@ main (int argc, char *argv[]) if (install_device[0] == '(' && install_device[grub_strlen (install_device) - 1] == ')') { - size_t len = grub_strlen (install_device) - 2; install_drive = xmalloc (len + 1); memcpy (install_drive, install_device + 1, len);