From: Robert Millan <rmh@aybabtu.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: handling mount points in grub-mkrelpath
Date: Fri, 4 Dec 2009 22:23:32 +0100 [thread overview]
Message-ID: <20091204212332.GL1528@thorin> (raw)
In-Reply-To: <1259527952.3150.31.camel@fz.local>
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 <fzielcke@z-51.de>
>
> * 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."
next prev parent reply other threads:[~2009-12-04 21:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-29 20:52 handling mount points in grub-mkrelpath Felix Zielcke
2009-12-04 21:23 ` Robert Millan [this message]
2009-12-06 9:22 ` Felix Zielcke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091204212332.GL1528@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.