* [PATCH] lib: consistency of compress formats for kernel image
@ 2014-11-03 5:28 HaesungKim
0 siblings, 0 replies; only message in thread
From: HaesungKim @ 2014-11-03 5:28 UTC (permalink / raw)
To: akpm, dan, yinghai, linux-kernel
Cc: Chan Jeong, 'Hyojun Im', stellarmatia
From: Haesung Kim <matia.kim@lge.com>
Magic number of compress formats for kernel image is defined by two bytes.
These numbers are written in hexadecimal number, nevertheless magic number
for
only gunzip is written in octal number. The formats should be consistent for
readability. Therefore, magic numbers for gunzip are also defined by
hexadecimal
number.
Signed-off-by: Haesung Kim <matia.kim@lge.com>
---
diff --git a/lib/decompress.c b/lib/decompress.c
index 37f3c78..528ff93 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -44,8 +44,8 @@ struct compress_format {
};
static const struct compress_format compressed_formats[] __initconst = {
- { {037, 0213}, "gzip", gunzip },
- { {037, 0236}, "gzip", gunzip },
+ { {0x1f, 0x8b}, "gzip", gunzip },
+ { {0x1f, 0x9e}, "gzip", gunzip },
{ {0x42, 0x5a}, "bzip2", bunzip2 },
{ {0x5d, 0x00}, "lzma", unlzma },
{ {0xfd, 0x37}, "xz", unxz },
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-03 5:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03 5:28 [PATCH] lib: consistency of compress formats for kernel image HaesungKim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox