From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NGfcs-0004Zw-6Z for mharc-grub-devel@gnu.org; Fri, 04 Dec 2009 16:23:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGfcq-0004Z6-TV for grub-devel@gnu.org; Fri, 04 Dec 2009 16:23:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGfcm-0004UQ-BU for grub-devel@gnu.org; Fri, 04 Dec 2009 16:23:40 -0500 Received: from [199.232.76.173] (port=54180 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGfcm-0004UC-2t for grub-devel@gnu.org; Fri, 04 Dec 2009 16:23:36 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8]:43286 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGfcl-0005Ue-N7 for grub-devel@gnu.org; Fri, 04 Dec 2009 16:23:36 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1NGfcj-0003j2-Fv for grub-devel@gnu.org; Fri, 04 Dec 2009 22:23:33 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1NGfci-0000d3-U2 for grub-devel@gnu.org; Fri, 04 Dec 2009 22:23:32 +0100 Date: Fri, 4 Dec 2009 22:23:32 +0100 From: Robert Millan To: The development of GNU GRUB Message-ID: <20091204212332.GL1528@thorin> References: <1259527952.3150.31.camel@fz.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1259527952.3150.31.camel@fz.local> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: handling mount points in grub-mkrelpath X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2009 21:23:41 -0000 On Sun, Nov 29, 2009 at 09:52:32PM +0100, Felix Zielcke wrote: > Vladimir wanted to have this discussed on ML > > The old shell function make_system_path_relative_to_its_root outputed / > if you gave it /boot and it was on a seperate partition. > grub-mkrelpath currently outputs /boot > > This breaks booting at least with the 10_linux generated entries. > > Attached is my fix for that, which I'll update today to Debian. > > We already broke backward compatibility with the commandline for Xen. > IMO in this grub-mkrelpath case there's no need to break compatibility. > > But maybe I can find a good way to handle this inside > util/grub-mkconfig_lib.in just for compatibility. Hi, The old behaviour seems correct, so there's no need to break compatibility. Please could you commit this in trunk? > 2009-11-29 Felix Zielcke > > * util/misc.c (make_system_path_relative_to_its_root): Correctly cope with > mount points. > === modified file 'util/misc.c' > --- util/misc.c 2009-11-25 23:10:02 +0000 > +++ util/misc.c 2009-11-29 19:19:28 +0000 > @@ -500,7 +500,17 @@ make_system_path_relative_to_its_root (c > > /* buf is another filesystem; we found it. */ > if (st.st_dev != num) > - break; > + { > + /* offset == 0 means path given is the mount point. */ > + if (offset == 0) > + { > + free (buf); > + free (buf2); > + return strdup ("/"); > + } > + else > + break; > + } > > offset = p - buf; > /* offset == 1 means root directory. */ > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."