zdump/dfi_s390: Get rid of device type check for s390_ext dump

Simplify ioctl error processing logic for "BLKSSZGET" operation.

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
2024-07-26 10:32:01 +02:00
committed by Jan Höppner
parent cee4bb4995
commit 4b19b9d950

View File

@@ -349,19 +349,14 @@ int dfi_s390_init_gen(bool extended)
if (!extended) {
rc = mem_chunks_add();
} else {
/*
* Dumps in s390_ext format can reside on DASD partition only.
* Do not bail out on ZG_TYPE_DASD in order to support loop device
* emulation in fvt-tests.
*/
if (zg_type(g.fh) != ZG_TYPE_DASD_PART &&
zg_type(g.fh) != ZG_TYPE_DASD)
return -ENODEV;
/*
* A device block size is required for a decompression of
* s390_ext dump with compressed dump segments.
* Since dumps in s390_ext format can reside on DASD partition
* only, bail out upon ioctl error on BLKSSZGET.
*/
zg_ioctl(g.fh, BLKSSZGET, &l.blk_size, "BLKSSZGET", ZG_CHECK);
if (zg_ioctl(g.fh, BLKSSZGET, &l.blk_size, "BLKSSZGET", ZG_CHECK_NONE))
return -ENODEV;
rc = mem_chunks_add_ext();
}
if (rc)