From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KLX9p-0008CI-DC for mharc-grub-devel@gnu.org; Wed, 23 Jul 2008 01:45:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLX9n-0008CC-6l for grub-devel@gnu.org; Wed, 23 Jul 2008 01:44:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLX9g-0008Bz-SS for grub-devel@gnu.org; Wed, 23 Jul 2008 01:44:56 -0400 Received: from [199.232.76.173] (port=60559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLX9g-0008Bw-FO for grub-devel@gnu.org; Wed, 23 Jul 2008 01:44:52 -0400 Received: from mailout07.t-online.de ([194.25.134.83]:35766) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLX9g-00070V-AL for grub-devel@gnu.org; Wed, 23 Jul 2008 01:44:52 -0400 Received: from fwd27.aul.t-online.de by mailout07.sul.t-online.de with smtp id 1KLX9e-0001qR-02; Wed, 23 Jul 2008 07:44:50 +0200 Received: from [10.3.2.2] (V+oEyiZSwh4DtVNFxaE+9JHZXjxVxXmfDXg-MYYiOFfa6yGtEVJUZecA0w+8TGTg2D@[217.235.251.206]) by fwd27.aul.t-online.de with esmtp id 1KLX9R-1oUNRA0; Wed, 23 Jul 2008 07:44:37 +0200 Message-ID: <4886C543.4060303@t-online.de> Date: Wed, 23 Jul 2008 07:44:35 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: The development of GRUB 2 References: <4883322E.6040606@t-online.de> <20080722215200.GA15825@thorin> In-Reply-To: <20080722215200.GA15825@thorin> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ID: V+oEyiZSwh4DtVNFxaE+9JHZXjxVxXmfDXg-MYYiOFfa6yGtEVJUZecA0w+8TGTg2D X-TOI-MSGID: c2ee78cd-fc52-4a6c-a808-e5135e7c8f1a X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] grub-probe -t prefix, fix update-grub_lib for Cygwin X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2008 05:44:59 -0000 Robert Millan wrote: > On Sun, Jul 20, 2008 at 02:40:14PM +0200, Christian Franke wrote: > >> The shell function make_system_path_relative_to_its_root() does not work >> on Cygwin due to path mapping (e.g. /boot/grub/ is actually >> /cygwin/boot/grub). >> >> This patch adds '-t prefix' to grub-probe. It prints result from >> grub_get_prefix() which is already extended for Cygwin (svn rev 1584). >> The result is used in make_system_path_relative_to_its_root(). This >> keeps the platform dependent code in getroot.c. >> >> Christian >> >> 2008-07-20 Christian Franke >> >> * util/grub-probe.c (enum): Add PRINT PREFIX. >> (probe): Add PRINT_PREFIX, prints result of >> grub_get_prefix (). >> (usage): Add `prefix' to `-t' usage text. >> Add some '\n' to avoid excess long lines. >> (main): Add check for `-t prefix' option. >> > > This is different than the usual grub-probe usage in that it doesn't operate > on a device. Perhaps it would make sense to add the functionality you want in > a separate utility? > > OK, probably /usr/bin/grub-prefix ? Drawback: getroot.c contains also grub_guess_root_device() etc, so a grub-prefix program would require most of the objects grub-probe requires. Put grub_get_prefix() in a new util/getprefix.c ? Or handle those platform dependencies in update-grub_lib.in itself. Can be done by a conditional call to 'cygpath' utility. This conditional must then be removed for the other platforms when generating update-grub_lib. Christian