Comments
Patch
===================================================================
@@ -36,15 +36,15 @@ int cbfs_decompress(int algo, void *src,
memcpy(dst, src, len);
return 0;
- case CBFS_COMPRESS_LZMA: {
- unsigned long ulzma(unsigned char *src, unsigned char *dst);
- ulzma(src, dst);
- }
+ case CBFS_COMPRESS_LZMA:
+ if (!ulzma(src, dst)) {
+ printk_err("CBFS: ulzma returned 0!\n");
+ return -1;
+ }
return 0;
default:
- printk_info( "CBFS: Unknown compression type %d\n",
- algo);
+ printk_info( "CBFS: Unknown compression type %d\n", algo);
return -1;
}
}
===================================================================
@@ -50,14 +50,17 @@
#define _CBFS_H_
#include <boot/coreboot_tables.h>
+
/** These are standard values for the known compression
alogrithms that coreboot knows about for stages and
- payloads. Of course, other LAR users can use whatever
+ payloads. Of course, other CBFS users can use whatever
values they want, as long as they understand them. */
#define CBFS_COMPRESS_NONE 0
#define CBFS_COMPRESS_LZMA 1
+unsigned long ulzma(unsigned char *src, unsigned char *dst);
+
/** These are standard component types for well known
components (i.e - those that coreboot needs to consume.
Users are welcome to use any other value for their