merge mainline into hints

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-12-24 02:52:43 +01:00
commit 2b5c1a0810
6 changed files with 53 additions and 18 deletions

View file

@ -526,13 +526,13 @@ if [ "x${devabstraction_module}" = "x" ] ; then
else
install_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${install_device}"`" || exit 1
fi
install_drive="`echo "${install_drive}" | sed -e s/,[a-z0-9,]*//g`"
install_drive="`echo "${install_drive}" | sed -e 's/^(\(\([^,\\\\]\|\\\\\\\\\|\\\\,\)*\)\(\(,[a-zA-Z0-9]*\)*\))$/\1/'`"
fi
grub_drive="`"$grub_probe" --device-map="${device_map}" --target=drive --device "${grub_device}"`" || exit 1
# Strip partition number
grub_partition="`echo "${grub_drive}" | sed -e 's/^[^,]*[,)]//; s/)$//'`"
grub_drive="`echo "${grub_drive}" | sed -e s/,[a-z0-9,]*//g`"
grub_partition="`echo "${grub_drive}" | sed -e 's/^(\(\([^,\\\\]\|\\\\\\\\\|\\\\,\)*\)\(\(,[a-zA-Z0-9]*\)*\))$/\3/'`"
grub_drive="`echo "${grub_drive}" | sed -e 's/^(\(\([^,\\\\]\|\\\\\\\\\|\\\\,\)*\)\(\(,[a-zA-Z0-9]*\)*\))$/\1/'`"
if ([ "x$disk_module" != x ] && [ "x$disk_module" != xbiosdisk ]) || [ "x${grub_drive}" != "x${install_drive}" ] || ([ "x$platform" != xefi ] && [ "x$platform" != xpc ] && [ x"${platform}" != x"ieee1275" ]); then
# generic method (used on coreboot and ata mod)
uuid="`"$grub_probe" --device-map="${device_map}" --target=fs_uuid --device "${grub_device}"`"
@ -571,7 +571,8 @@ if [ "x${devabstraction_module}" = "x" ] ; then
if [ x"$grub_partition" = x ]; then
prefix_drive="()"
else
prefix_drive="(,$grub_partition)"
# Comma is already there
prefix_drive="($grub_partition)"
fi
fi
else

View file

@ -245,7 +245,7 @@ of_path_of_ide(char *of_path,
p = get_basename (sysfs_path);
sscanf(p, "%d.%d", &chan, &devno);
ret = __of_path_common(of_path, sysfs_path, device, devno);
ret = __of_path_common(of_path, sysfs_path, device, 2 * chan + devno);
free (sysfs_path);
return ret;