File lilo.x86.division-by-zero.patch of Package lilo

Bug 429544 - lilo fails with floating point exception

Avoid a division by zero on buggy BIOS 

Index: lilo-22.8/probe.c
===================================================================
--- lilo-22.8.orig/probe.c
+++ lilo-22.8/probe.c
@@ -1039,7 +1039,10 @@ int bios_device(GEOMETRY *geo, int devic
 	    geo->sectors = bdata.n_sect;
 	    geo->heads = bdata.n_head;
 	    if (bdata.n_total_blocks > nblocks) nblocks = bdata.n_total_blocks;
-	    geo->cylinders = nblocks / (bdata.n_head*bdata.n_sect);
+	    if (bdata.n_head*bdata.n_sect)
+		geo->cylinders = nblocks / (bdata.n_head*bdata.n_sect);
+	    else
+		geo->cylinders = nblocks;
 #endif
 	}
 	return (geo->device = bios1);