bzip2/lzma: centralize format detection
Centralize the compression format detection to a common routine in the
lib directory, and use it for both initramfs and initrd.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h
index f847f51..6dfb856 100644
--- a/include/linux/decompress/generic.h
+++ b/include/linux/decompress/generic.h
@@ -26,5 +26,8 @@
*fill should be called (repeatedly...) to read data, at most IOBUF_SIZE
*/
+/* Utility routine to detect the decompression method */
+decompress_fn decompress_method(const unsigned char *inbuf, int len,
+ const char **name);
#endif