[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2 v2] second attempt to fix using grub device name as insta
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH 2/2 v2] second attempt to fix using grub device name as install device |
Date: |
Sat, 07 Dec 2013 14:50:09 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 |
On 07.12.2013 11:19, Andrey Borzenkov wrote:
> 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).
>
Did you test it with both syntaxes?
> ---
> ChangeLog | 4 ++--
> util/grub-install.c | 8 +++++++-
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index b93db5e..161c568 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,7 +1,7 @@
> 2013-11-29 Andrey Borzenkov <address@hidden>
>
> - Revert commit 69ca97c820, it cause failures in using OS device name
> - in grub-install.
> + 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-06 Vladimir Serbinenko <address@hidden>
>
> diff --git a/util/grub-install.c b/util/grub-install.c
> index 7a1db42..0a9790a 100644
> --- a/util/grub-install.c
> +++ b/util/grub-install.c
> @@ -1098,7 +1098,13 @@ main (int argc, char *argv[])
> {
> if (install_device[0] == '('
> && install_device[grub_strlen (install_device) - 1] == ')')
> - install_drive = xstrdup (install_device);
> + {
> +
> + size_t len = grub_strlen (install_device) - 2;
> + install_drive = xmalloc (len + 1);
> + memcpy (install_drive, install_device + 1, len);
> + install_drive[len] = '\0';
> + }
> else
> {
> grub_util_pull_device (install_device);
>
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH] Fix grub-install with OS device name, (continued)
- Re: [PATCH] Fix grub-install with OS device name, Jonathan McCune, 2013/12/04
- Re: [PATCH] Fix grub-install with OS device name, Colin Watson, 2013/12/04
- Re: [PATCH] Fix grub-install with OS device name, arvidjaar, 2013/12/05
- Re: [PATCH] Fix grub-install with OS device name, Andrey Borzenkov, 2013/12/05
- [PATCH 1/2] revert 69ca97c820, it broke using OS device name as install device, Andrey Borzenkov, 2013/12/07
- [PATCH 2/2] second attempt to fix using grub device name as install device, Andrey Borzenkov, 2013/12/07
- Re: [PATCH 2/2] second attempt to fix using grub device name as install device, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/07
- Re: [PATCH 2/2] second attempt to fix using grub device name as install device, Andrey Borzenkov, 2013/12/07
- Re: [PATCH 2/2] second attempt to fix using grub device name as install device, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/07
- [PATCH 2/2 v2] second attempt to fix using grub device name as install device, Andrey Borzenkov, 2013/12/07
- Re: [PATCH 2/2 v2] second attempt to fix using grub device name as install device,
Vladimir 'φ-coder/phcoder' Serbinenko <=
- Re: [PATCH 2/2 v2] second attempt to fix using grub device name as install device, Andrey Borzenkov, 2013/12/07
- Re: [PATCH 2/2 v2] second attempt to fix using grub device name as install device, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/07