zdump/dt_s390: Support new dumper version by 'zgetdump -d'

Add new dumper version support to 'zgetdump -d' command.

Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Mikhail Zaslonko
2023-03-01 12:38:08 +01:00
committed by Jan Höppner
parent fda1e0d33d
commit ca3cd51f91
2 changed files with 5 additions and 1 deletions

View File

@@ -33,6 +33,7 @@
#define STAGE2_DUMPER_SIZE_V1 _AC(0x1000, UL)
#define STAGE2_DUMPER_SIZE_V2 _AC(0x2000, UL)
#define STAGE2_DUMPER_SIZE_V3 _AC(0x3000, UL)
#define STAGE2_DUMPER_SIZE_ZLIB _AC(0x8000, UL)
#define STAGE3_ENTRY _AC(0xa000, UL)

View File

@@ -160,7 +160,10 @@ void df_s390_dumper_read(struct zg_fh *fh, int blk_size,
dumper->size = STAGE2_DUMPER_SIZE_V1;
break;
case 2:
dumper->size = STAGE2_DUMPER_SIZE_V2;
if (strncmp(dumper->magic, DF_S390_DUMPER_MAGIC_EXT, 7) == 0)
dumper->size = STAGE2_DUMPER_SIZE_ZLIB;
else
dumper->size = STAGE2_DUMPER_SIZE_V2;
break;
case 3:
default: