From: "HaesungKim" <matia.kim@lge.com>
To: <akpm@linux-foundation.org>, <dan@danweeks.net>,
<yinghai@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: "Chan Jeong" <chan.jeong@lge.com>,
"'Hyojun Im'" <hyojun.im@lge.com>, <stellarmatia@gmail.com>
Subject: [PATCH] lib: consistency of compress formats for kernel image
Date: Mon, 3 Nov 2014 14:28:56 +0900 [thread overview]
Message-ID: <001e01cff727$10a4ba50$31ee2ef0$@lge.com> (raw)
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 },
reply other threads:[~2014-11-03 5:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001e01cff727$10a4ba50$31ee2ef0$@lge.com' \
--to=matia.kim@lge.com \
--cc=akpm@linux-foundation.org \
--cc=chan.jeong@lge.com \
--cc=dan@danweeks.net \
--cc=hyojun.im@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stellarmatia@gmail.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox