From 4b19b9d95062999d4f423b72bb5000d3d5db72ef Mon Sep 17 00:00:00 2001 From: Mikhail Zaslonko Date: Fri, 26 Jul 2024 10:32:01 +0200 Subject: [PATCH] zdump/dfi_s390: Get rid of device type check for s390_ext dump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify ioctl error processing logic for "BLKSSZGET" operation. Signed-off-by: Mikhail Zaslonko Reviewed-by: Alexander Egorenkov Signed-off-by: Jan Höppner --- zdump/dfi_s390.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/zdump/dfi_s390.c b/zdump/dfi_s390.c index c7d1f98a..526a77fc 100644 --- a/zdump/dfi_s390.c +++ b/zdump/dfi_s390.c @@ -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)