Skip to contentSkip to conversation

PreP zero compare

PATCH New Vladimir 'φ-coder/phcoder' Serbinenko 1 participant 1 message May 10, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PreP zero compare

Please test attached patch

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'util/grub-install.in'

grub-install.in +1 -1
@@ -776,7 +776,7 @@ elif [ "${grub_modinfo_target_cpu}-${gru
 		exit 1
             fi
 
-            if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" = ELF ] || [ $(cmp /dev/zero "${install_device}" &>/dev/null) ]; then
+            if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" = ELF ] || [ x$("${grub_probe}" -m "${device_map}" -d "${install_device}" -t zero_check) = xtrue ]; then
             # Change boot device to the harddisk root
 		boot_device="$ofpath"
 		dd if="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" of="${install_device}" status=noxfer || {

=== modified file 'util/grub-probe.c'

grub-probe.c +42 -0

60 lines not on this page · raw message