From bc3432061e09670a101df33c974ec903ecfc28a7 Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Sun, 29 Nov 2009 21:27:36 +0100 Subject: [PATCH] patches/02_fix_mountpoints_in_mkrelpath.diff: New patch to handle mount points like the old shell function did. (Closes: #558042) --- debian/changelog | 6 +++- .../02_fix_mountpoints_in_mkrelpath.diff | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 debian/patches/02_fix_mountpoints_in_mkrelpath.diff diff --git a/debian/changelog b/debian/changelog index 4872de95b..1215bd918 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,11 @@ grub2 (1.97+20091125-2) unstable; urgency=low used). * grub.d/05_debian_theme: Make output string distro-agnostic. - -- Robert Millan Sun, 29 Nov 2009 04:13:25 +0100 + [ Felix Zielcke ] + * patches/02_fix_mountpoints_in_mkrelpath.diff: New patch to handle + mount points like the old shell function did. (Closes: #558042) + + -- Felix Zielcke Sun, 29 Nov 2009 21:26:37 +0100 grub2 (1.97+20091125-1) unstable; urgency=low diff --git a/debian/patches/02_fix_mountpoints_in_mkrelpath.diff b/debian/patches/02_fix_mountpoints_in_mkrelpath.diff new file mode 100644 index 000000000..ca224ca7f --- /dev/null +++ b/debian/patches/02_fix_mountpoints_in_mkrelpath.diff @@ -0,0 +1,36 @@ +=== modified file 'ChangeLog' +--- ChangeLog 2009-11-28 19:40:44 +0000 ++++ ChangeLog 2009-11-29 19:19:28 +0000 +@@ -1,3 +1,8 @@ ++2009-11-29 Felix Zielcke ++ ++ * util/misc.c (make_system_path_relative_to_its_root): Correctly cope with ++ mount points. ++ + 2009-11-28 Vladimir Serbinenko + + Correct module naming. + +=== 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. */ + -- 2.39.2