From 2702615286e5339d497bcdd75265935f927d3dc9 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Tue, 21 Apr 2015 16:15:44 +0300 Subject: [PATCH] show: read a second magic when it's required Now image files contains two magics, so we need to handle both of them. Signed-off-by: Andrey Vagin Signed-off-by: Pavel Emelyanov --- cr-show.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cr-show.c b/cr-show.c index cafc2a666..91d4d095a 100644 --- a/cr-show.c +++ b/cr-show.c @@ -380,6 +380,11 @@ int cr_parse_fd(struct cr_img *img, u32 magic) { int ret = 0, i; + if (magic == IMG_COMMON_MAGIC || magic == IMG_SERVICE_MAGIC) { + if (read_img(img, &magic) < 0) + goto out; + } + if (magic == PSTREE_MAGIC) { show_collect_pstree(img, 0); goto out;