From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KM51L-0007Wl-70 for mharc-grub-devel@gnu.org; Thu, 24 Jul 2008 13:54:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KM51J-0007WE-Gw for grub-devel@gnu.org; Thu, 24 Jul 2008 13:54:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KM51H-0007Vh-2b for grub-devel@gnu.org; Thu, 24 Jul 2008 13:54:28 -0400 Received: from [199.232.76.173] (port=33266 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KM51G-0007Ve-Sc for grub-devel@gnu.org; Thu, 24 Jul 2008 13:54:26 -0400 Received: from mailout03.t-online.de ([194.25.134.81]:52875) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KM51G-0002GY-CJ for grub-devel@gnu.org; Thu, 24 Jul 2008 13:54:26 -0400 Received: from fwd32.aul.t-online.de by mailout03.sul.t-online.de with smtp id 1KM51E-0001iW-00; Thu, 24 Jul 2008 19:54:24 +0200 Received: from [10.3.2.2] (bHKCD4Za8hwL9PmftHfHhS73VcO1qXsz8JhO6ZgNiRUDXEEF4BhjQ1BhAq9i-f6wCp@[217.235.230.88]) by fwd32.aul.t-online.de with esmtp id 1KM50w-0I1Fi40; Thu, 24 Jul 2008 19:54:06 +0200 Message-ID: <4888C1BE.1080408@t-online.de> Date: Thu, 24 Jul 2008 19:54:06 +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> <4886C543.4060303@t-online.de> In-Reply-To: <4886C543.4060303@t-online.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ID: bHKCD4Za8hwL9PmftHfHhS73VcO1qXsz8JhO6ZgNiRUDXEEF4BhjQ1BhAq9i-f6wCp X-TOI-MSGID: e4cefbbc-bb45-4418-a720-87dccac86b2d 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: Thu, 24 Jul 2008 17:54:29 -0000 Christian Franke wrote: > 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. > Any comment on this? The pe2elf converter and related patches from Bean, and my remaining patches for Cygwin were committed today. This 'prefix' fix is the last patch which is necessary of out of the box Cygwin support in the next release, otherwise grub-install would not work. Christian