Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ez15O-0002mA-SE for mharc-grub-devel@gnu.org; Thu, 22 Mar 2018 10:20:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ez15M-0002li-95 for grub-devel@gnu.org; Thu, 22 Mar 2018 10:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ez15I-0006Io-4k for grub-devel@gnu.org; Thu, 22 Mar 2018 10:20:56 -0400 Received: from boksu.net-space.pl ([185.15.1.105]:56237) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1ez15H-0006IN-Qx for grub-devel@gnu.org; Thu, 22 Mar 2018 10:20:52 -0400 Received: (from localhost user: 'dkiper' uid#4000 fake: STDIN (dkiper@boksu.net-space.pl)) by router-fw-old.local.net-space.pl id S1833289AbeCVOQq (ORCPT ); Thu, 22 Mar 2018 15:16:46 +0100 Date: Thu, 22 Mar 2018 15:16:46 +0100 From: Daniel Kiper To: The development of GNU GRUB Cc: Samuel Thibault Subject: Re: [PATCHv2] os-prober: Fix translating device to mach format Message-ID: <20180322141646.GG7226@router-fw-old.local.net-space.pl> References: <20180314131408.20945-1-samuel.thibault@ens-lyon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180314131408.20945-1-samuel.thibault@ens-lyon.org> User-Agent: Mutt/1.3.28i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.15.1.105 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 14:20:57 -0000 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 > > --- > 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