Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ew6Ec-0007kT-SG for mharc-grub-devel@gnu.org; Wed, 14 Mar 2018 09:14:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ew6ES-0007hK-5Z for grub-devel@gnu.org; Wed, 14 Mar 2018 09:14:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ew6EP-00024q-0X for grub-devel@gnu.org; Wed, 14 Mar 2018 09:14:16 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:47994) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ew6EO-00024d-Pb for grub-devel@gnu.org; Wed, 14 Mar 2018 09:14:12 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2D6CF129F2; Wed, 14 Mar 2018 14:14:11 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CGYLjQ_jRVb6; Wed, 14 Mar 2018 14:14:09 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (dhcp-13-158.lip.ens-lyon.fr [140.77.13.158]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 84666129EF; Wed, 14 Mar 2018 14:14:09 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.90_1) (envelope-from ) id 1ew6EL-0005SW-3t; Wed, 14 Mar 2018 14:14:09 +0100 From: Samuel Thibault To: grub-devel@gnu.org Cc: Samuel Thibault Subject: [PATCHv2] os-prober: Fix translating device to mach format Date: Wed, 14 Mar 2018 14:14:08 +0100 Message-Id: <20180314131408.20945-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.16.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.233.100.1 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: Wed, 14 Mar 2018 13:14:25 -0000 grub-probe --device /dev/sda --target=drive would currently print on Linux x86 "hostdisk//dev/sda,msdos1", i.e. not 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/'`" grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`" case "${grub_fs}" in *fs) hurd_fs="${grub_fs}" ;; -- 2.16.1