diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-02-16 20:05:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-02-16 20:05:28 +0000 |
commit | 41e056b08e4c5c8d6e78407a5586afa52867fd5f (patch) | |
tree | 5c065bb2a5c9eb0386762c79e910ad74512def88 /sys-boot/os-prober/files | |
parent | b18dbdc69b2be6f0ac0db668b0bc57fb6f766afc (diff) |
gentoo auto-resync : 16:02:2023 - 20:05:28
Diffstat (limited to 'sys-boot/os-prober/files')
-rw-r--r-- | sys-boot/os-prober/files/os-prober-1.81-boot-detected-twice.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/sys-boot/os-prober/files/os-prober-1.81-boot-detected-twice.patch b/sys-boot/os-prober/files/os-prober-1.81-boot-detected-twice.patch new file mode 100644 index 000000000000..b06b31d0077e --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.81-boot-detected-twice.patch @@ -0,0 +1,46 @@ +diff -urN o/common.sh os-prober-1.81/common.sh +--- o/common.sh 2023-01-22 13:43:23.333123217 -0800 ++++ os-prober-1.81/common.sh 2023-01-22 13:44:49.408153101 -0800 +@@ -326,3 +326,18 @@ + fi + } + ++list_mounts() { ++ if [ -f /proc/self/mountinfo ]; then ++ local x dev mount devs found ++ found=: ++ while read -r x x dev x mount x x fs x; do ++ if [ -L "/sys/dev/block/$dev" ]; then ++ devs="/dev/`readlink \"/sys/dev/block/$dev\" | rev | cut -d/ -f1 | rev`" ++ printf '%s %s %s\n' "$(mapdevfs "$devs")" "$mount" "$fs" ++ found="return 0" ++ fi ++ done < /proc/self/mountinfo ++ $found ++ fi ++ grep "^/dev/" /proc/mounts | parse_proc_mounts ++} +diff -urN o/linux-boot-prober os-prober-1.81/linux-boot-prober +--- o/linux-boot-prober 2023-01-22 13:43:23.334123229 -0800 ++++ os-prober-1.81/linux-boot-prober 2023-01-22 13:43:34.897260733 -0800 +@@ -17,7 +17,7 @@ + bootsv= + bootuuid= + +-grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true ++list_mounts >"$OS_PROBER_TMP/mounted-map" || true + + if [ -z "$1" ]; then + ERR=y +diff -urN o/os-prober os-prober-1.81/os-prober +--- o/os-prober 2023-01-22 13:43:23.334123229 -0800 ++++ os-prober-1.81/os-prober 2023-01-22 13:43:34.897260733 -0800 +@@ -128,7 +128,7 @@ + + # We need to properly canonicalize partitions with mount points and partitions + # used in RAID +-grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true ++list_mounts >"$OS_PROBER_TMP/mounted-map" || true + : >"$OS_PROBER_TMP/swaps-map" + if [ -f /proc/swaps ]; then + grep "^/dev/" /proc/swaps | parse_proc_swaps >"$OS_PROBER_TMP/swaps-map" || true |