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 <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin 2015-04-21 16:15:44 +03:00 committed by Pavel Emelyanov
parent 90e79b741c
commit 2702615286

View file

@ -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;