[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCHv2] os-prober: Fix translating device to mach format
From: |
Daniel Kiper |
Subject: |
Re: [PATCHv2] os-prober: Fix translating device to mach format |
Date: |
Thu, 22 Mar 2018 15:16:46 +0100 |
User-agent: |
Mutt/1.3.28i |
On Wed, Mar 14, 2018 at 02:14:08PM +0100, Samuel Thibault wrote:
> grub-probe --device /dev/sda --target=drive
>
> would currently print on Linux x86 "hostdisk//dev/sda,msdos1", i.e. not
I have a feeling that grub-probe should be fixed instead of that.
Probably it was broken at some point because e.g. Debian GRUB2
1.99-27+deb7u3 produces: (hd0) Hmmmm... Could you double check it?
> something we can translate easily. We can instead use compatibility_hint
> which have more well-defined format (hd0,1)
>
> Signed-off-by: Samuel Thibault <address@hidden>
>
> ---
> new in v2: Fix typo and be more verbose in changelog
> ---
> util/grub.d/30_os-prober.in | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
> index 515a68c7a..38444fe65 100644
> --- a/util/grub.d/30_os-prober.in
> +++ b/util/grub.d/30_os-prober.in
> @@ -297,8 +297,8 @@ menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)'
> --class hurd --class gnu -
> EOF
> save_default_entry | grub_add_tab
> prepare_grub_to_access_device ${DEVICE} | grub_add_tab
> - grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
> - mach_device="`echo "${grub_device}" | sed -e
> 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
> + grub_device="`${grub_probe} --device ${DEVICE}
> --target=compatibility_hint`"
> + mach_device="`echo "${grub_device}" | sed -e
> 's/\(hd.*\),msdos\(.*\)/\1s\2/'`"
Why do you drop parentheses here?
Daniel