From 71c7861e189749b19a88f6bea14f6d93eb5a33bc Mon Sep 17 00:00:00 2001
From: Mike Hibler <mike@flux.utah.edu>
Date: Fri, 15 Oct 2004 17:51:04 +0000
Subject: [PATCH] Add comment about shortcoming of LILO relocation mode: it
 does not rewrite the embedded BIOS disk number in sector addresses.  So you
 still cannot create an image on disk 0 and load it on disk 1.

---
 os/imagezip/imageunzip.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/os/imagezip/imageunzip.c b/os/imagezip/imageunzip.c
index eb2b33ff48..1a70396326 100644
--- a/os/imagezip/imageunzip.c
+++ b/os/imagezip/imageunzip.c
@@ -1469,6 +1469,16 @@ reloc_bsdlabel(struct disklabel *label, int reloctype)
 
 #include "extfs/lilo.h"
 
+/*
+ * Relocate a LILO sector address.  The address has been made relative
+ * to the partition start so we need to add back the current partition
+ * offset.
+ *
+ * XXX we still need to update the device portion of the sector to plug in
+ * the appropriate BIOS device number for the drive we are being loaded on.
+ * Either the user will have to specify that explicitly, or imageunzip will
+ * have to get it from the OS or figure it out itself.
+ */
 static void
 reloc_lilo(void *addr, int reloctype, uint32_t size)
 {
-- 
GitLab