diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
commit | 7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch) | |
tree | 1684924656132935256e034f35f92abee6623265 /sys-boot/grub/files/grub-1.98-follow-dev-mapper-symlinks.patch |
Added ebuilds for kogaion desktop
Diffstat (limited to 'sys-boot/grub/files/grub-1.98-follow-dev-mapper-symlinks.patch')
-rw-r--r-- | sys-boot/grub/files/grub-1.98-follow-dev-mapper-symlinks.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys-boot/grub/files/grub-1.98-follow-dev-mapper-symlinks.patch b/sys-boot/grub/files/grub-1.98-follow-dev-mapper-symlinks.patch new file mode 100644 index 00000000..aead475c --- /dev/null +++ b/sys-boot/grub/files/grub-1.98-follow-dev-mapper-symlinks.patch @@ -0,0 +1,25 @@ +--- a/util/getroot.c 2010-03-06 20:51:37.000000000 +0000 ++++ b/util/getroot.c 2010-05-28 19:21:57.592307313 +0100 +@@ -222,9 +222,20 @@ find_root_device (const char *dir, dev_t + /* Ignore any error. */ + continue; + +- if (S_ISLNK (st.st_mode)) +- /* Don't follow symbolic links. */ ++ if (S_ISLNK (st.st_mode)) { ++#ifdef __linux__ ++ if (strcmp (dir, "mapper") == 0) { ++ /* Follow symbolic links under /dev/mapper/; the canonical name ++ may be something like /dev/dm-0, but the names under ++ /dev/mapper/ are more human-readable and so we prefer them if ++ we can get them. */ ++ if (stat (ent->d_name, &st) < 0) ++ continue; ++ } else ++#endif /* __linux__ */ ++ /* Don't follow other symbolic links. */ + continue; ++ } + + if (S_ISDIR (st.st_mode)) + { |