[LinuxBIOS] r538 - in LinuxBIOSv3: lib util/lar

svn at openbios.org svn at openbios.org
Wed Dec 5 00:15:33 CET 2007


Author: hailfinger
Date: 2007-12-05 00:15:33 +0100 (Wed, 05 Dec 2007)
New Revision: 538

Modified:
   LinuxBIOSv3/lib/lar.c
   LinuxBIOSv3/util/lar/stream.c
Log:
Change wrong "LAR: NO FILE FOUND!" message to "LAR: File not found!".
The message appears if a file has not been found in the LAR archive and
is triggered even by lookup routines. Normal capitalization helps
reducing the frightening effect of the message.

Correct a few typos in other areas of the LAR code as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>


Modified: LinuxBIOSv3/lib/lar.c
===================================================================
--- LinuxBIOSv3/lib/lar.c	2007-12-04 22:42:38 UTC (rev 537)
+++ LinuxBIOSv3/lib/lar.c	2007-12-04 23:15:33 UTC (rev 538)
@@ -141,7 +141,7 @@
 		walk += (ntohl(header->offset) + ntohl(header->len) - 1)
 			 & 0xfffffff0;
 	}
-	printk(BIOS_SPEW, "LAR: NO FILE FOUND!\n");
+	printk(BIOS_SPEW, "LAR: File not found!\n");
 	return 1;
 }
 

Modified: LinuxBIOSv3/util/lar/stream.c
===================================================================
--- LinuxBIOSv3/util/lar/stream.c	2007-12-04 22:42:38 UTC (rev 537)
+++ LinuxBIOSv3/util/lar/stream.c	2007-12-04 23:15:33 UTC (rev 538)
@@ -63,7 +63,7 @@
 
 /**
  * Output all the ELF segments for a given file
- * @param lar The LAR Archoe
+ * @param lar The LAR archive
  * @param name The LAR name
  * @param filebuf The ELF file
  * @param filelen Size of the ELF file
@@ -88,9 +88,13 @@
 	u32 complen;
 
 	/* Allocate a temporary buffer to compress into - this is unavoidable,
-	   because we need to make sure that the compressed data will fit in
-	   the LAR, and we won't know the size of the compressed data until
-	   we actually compress it */
+	 * because we need to make sure that the compressed data will fit in
+	 * the LAR, and we won't know the size of the compressed data until
+	 * we actually compress it.
+	 * FIXME: In case the compressed file is bigger than the original,
+	 * we corrupt memory. Compute maximum size increase and allocate that
+	 * on top of the file length.
+	 */
 
 	temp = calloc(filelen, 1);
 





More information about the coreboot mailing list